gcmd-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gcmd-dev] [NEW] Advrename on steroids


From: Piotr Eljasiak
Subject: Re: [gcmd-dev] [NEW] Advrename on steroids
Date: Thu, 27 Nov 2008 19:32:45 +0100

> What about creating special file format, that can hold one (or more)
> "profiles", so that people can publish they advrename "profiles"
> and other could just dowload them? ;)

Here it is - starting from rev. 2317 gcmd can read/write XML cfg file
(~/.gnome-commander/gnome-commander.xml). Currently it is used for
advrename settings only, but I do plan to move here all other gcmd
settings. The cfg data are read at startup and saved at the end - so
there is no 'intermediate' saves. The file format is pretty
straightforward:

<?xml version="1.0" encoding="UTF-8"?>
<GnomeCommander version="1.2.8">
        <AdvancedRenameTool>
                <WindowSize width="1106" height="697" />
                <Profile name="Default">
                        <Template>$n, 
$T(Image.Width)x$T(Image.Height).$e</Template>
                        <Counter start="1" step="1" width="1" />
                        <Regexes>
                                <Regex pattern="[- _+]" replace=" " 
match-case="0" />
                        </Regexes>
                        <CaseConversion use="0" />
                        <TrimBlanks use="3" />
                </Profile>
                <Profile name="CamelCase">
                        <Template>$N</Template>
                        <Counter start="1" step="1" width="1" />
                        <Regexes>
                                <Regex pattern="\s*\b(\w)(\w*)\b" 
replace="\u\1\L\2\E"
match-case="0" />
                                <Regex pattern="\.(.+)$" replace="\L\1" 
match-case="0" />
                        </Regexes>
                        <CaseConversion use="0" />
                        <TrimBlanks use="3" />
                </Profile>
                <TemplateHistory>
                        <Template>$n, 
$T(Image.Width)x$T(Image.Height).$e</Template>
                        <Template>$N</Template>
                        <Template>$T(Doc.Author) - $T(Doc.Title).$e</Template>
                        <Template>$T(Audio.AlbumArtist) - 
$T(Audio.Title).$e</Template>
                </TemplateHistory>
        </AdvancedRenameTool>
</GnomeCommander>

'Deafult' profile refers to the current advrename settings. There is
still no gui for profiles usage/management at the moment, but that
should change in the nearest future ;o)


Enjoy,
Piotr





reply via email to

[Prev in Thread] Current Thread [Next in Thread]