xfce3rc -> xfce4rc conversion ?

Ric fhj52ads at yahoo.com
Sat Aug 2 04:25:19 CEST 2003


Hi Matthew:

Thanks for joining in!  XFce3 users deserve it.

I am doing several things.  Since I also am having a rendering problem
with nedit, I am slowwwed down a bit 'till it is fixed( I do  not 
think it is xfce4/xfwm4; - D! motif!!!).

I am working on the regex to parse the contents of the file that are
pertinent to using them for the xfc4rc +plus the switcher info but
ignoring the rest for now(Jasper's advice).  The Buttons names and
Screens count are important because the panel from xfce3 always has
"Buttons", now known as "Switcher" and I think that should be input
even tho' it is not in the xfce4rc.

Apparently, libxml2 is used to make the xml file. There is no doc
(*that I can find*) on that other than the c code and, of course, the
libxml2 docs...

I have not given up on using somebody's OSS to do most/part of the job.
 I found a couple of JAVA programs that might make a web interface
possible. As well as a couple of (your fav) PERL programs...
testing....

If other options fail, once I get the regex done I am going to input
them as the "Language" to  code2html  and see what it churns out; if it
is good HTML then HTML can be converted to XML and, with a proper
mapping, the xfce4rc file. Or, better, the XML PERL constructs can be
added to code2html so that it churns out an XML file.  I am quite sure
that the author would not mand having that in his code.  After all XML
is better than HTML since one can get multi language and multi format
out of it. yada...

It's a shame that the xfce3rc file was not just created using some well
known language format, e.g.,  Ada, Awk, C, C++, HTML, Java, JavaScript,
m4, Makefile, Pascal, Perl, SQL, ruby or even povray or groff;
code2html already works with all of those...

xf324 has a good start... there may be some parts that could be used -
not done with it yet.  Using  c  does seem like an overkill tho' - the
xfce3rc files are small:  usually less than 10kB and there is not a lot
of processing power required.


I may have a partial solution tomorrow; we'll see.  But it may(probably
will) need your help to do it The Right Way(TM). 



--- Matthew Weier OPhinney <matthew-lists at weierophinney.net> wrote:
> -- Ric <fhj52ads at yahoo.com> wrote
> (on Thursday, 31 July 2003, 09:56 AM -0700):
> > Hi Matthew:
> > 
> > Thanks for the reply and offer.
> > 
> > I know some regex  and can, generally, decipher simple PERL but I
> don't
> > know PERL well enuf to program with it. 
> > 
> > I've been meaning to work out some of this and I suppose now is as
> good
> > a time as any. It will give you an idea of what is up and, maybe,
> too,
> > Olivier et al will make corrections and suggestions if I post
> thoughts
> > here.
> > 
> > The xfce3rc file is structured but I cannot be sure that the
> structure
> > I have is universal applied throughout the (XFce3) world's
> languages. 
> > Olivier could help there; maybe somebody else too.
> > 
> > Here's part of an old one:
> 
> <snip>
> 
> > I have not worked out all the _specific_ conversions but it goes
> > something like this:
> 
> <snip>
> 
> > The real meat is that something similar to a DTDSS is needed to
> convert
> > the, probably, regex found items to the format that is the xfce4rc.
> 
> > That should be available somewhere; after all, something is parsing
> and
> > creating/modifying the xfce4rc XML file.
> 
> May not need a DTD, actually -- as long as we have the xfce4rc xml
> documented, we can use logical constructs and/or data structures in
> perl
> to have the elements placed correctly. To my thinking, I'd have the
> perl
> script slurp up the entire file and parse it, placing items it finds
> into data structures, then writing the XML based on the data
> structures.
> 
> > Also, if the ap is to be really useful to a new convert, it needs
> to be
> > written so that it can supply the other configuration items even
> if,
> > initially, it does not do anything but the panel.
> 
> Good point -- we will need to know what defaults are expected by
> xfce4.
> 
> > I do not know, now, how to get that info to other settings. H! I
> don't
> > even know how to get it into xfce4rc format, yet. :)
> > 
> > As you can see, it will take a bit of time _especially_ for someone
> > like me that does not know/understand the intricacies of xfce3 and
> > xfce4 as well as Olivier and other core developers do.  
> > 
> > Well, that's plenty for you to think about. :)
> > 
> > I'm tired and going to sleep for a while. But let me know if it
> > still interests you, okay?
> 
> Sounds good. Let me know what you find with the C conversion utility
> --
> if it's far enough along, it may be better to extend that then to do
a 
> new utility in perl. If that's the case, I may not be able to help
> much. If it's not too far along, though, we can probably rip some of
> its logic out as a basis for the perl script.
> 
> I may or may not have much time to work on it, but I'm certainly
> willing to give it a try!
>
> 
> > --- Matthew Weier OPhinney <matthew-lists at weierophinney.net> wrote:
> > > -- Ric <fhj52ads at yahoo.com> wrote
> > > (on Thursday, 31 July 2003, 03:52 AM -0700):
> > > > Hey Botsie:
> > > > 
> > > > --- Biju Chacko <biju_chacko at vsnl.net> wrote:
> > > > > On Wed, 30 Jul 2003 20:48:25 -0700 (PDT), Ric wrote:
> > > > > 
> > > > > > I... want to automate converting my XFce 3 panel info into
> > > XFce4
> > > > > panel
> > > > > > info.  
> > > > > 
> > > > > Search the archives. 
> > > > 
> > > > I am having no luck finding a single program that allows me to
> > > > 'just do it' in Linux.  Actually I have not found any OSS
> program
> > > > in Linux that can take text and produce XML using any kind of
> > > > transformation tag sheet/doc/DTD so that one can have a one to
> one
> > > > correspondence between the (structured) text and the XML file
> > > > created. 
> > > > 
> > > > Fortunately, the parts in  xfce3rc  that need transformation
> are
> > > > structured so maybe it won't be that hard to do...
> > > 
> > > While I can't think of a *program* that would do it, I *DO* know
> that
> > > there are ways to do this in perl. 
> > > 
> > > You claim that the xfce3rc file is structured, which means you
> > > *should*
> > > be able to parse it into a complex data structure in perl, which
> can
> > > then be rewritten to XML using a number of facilities --
> XML::Simple
> > > being likely the easiest as you should be able to just throw it
> the
> > > data structure and have the XML generated by it.
> > > 
> > > I may be able to help, if you'd like.
> 
> -- 
> Matthew Weier O'Phinney
> http://weierophinney.net/matthew/
> _______________________________________________



=====
Have A Great Day!

Ric
***
Mondale knew this was gonna be a bad day when he called 
Dial-a-Prayer and the taped message answered him by name.
 -- Bob Hope, 1903-2003

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the Xfce4-dev mailing list