xfce3rc -> xfce4rc conversion ?
Matthew Weier OPhinney
matthew-lists at weierophinney.net
Fri Aug 1 14:12:33 CEST 2003
-- 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/
More information about the Xfce4-dev
mailing list