duplicity-team team mailing list archive
-
duplicity-team team
-
Mailing list archive
-
Message #00006
Backup profiles / Command line processing
Hello,
I was thinking about the backup profiles. Part of that support would
probably be to represent the configuration in a more generic fashion
(e.g. a dict, with a dict of parse rules to go with the parsing
process) such that we can load multiple sets of configurations and
have them over-ride each other in priority order, and make the parsing
independent of whether the input is the command line or a file, etc.
This would entail some significant changes to command line parsing,
and the command line parsing is something which has kinda annoyed me
for a while in the code base.
So I'm thinking the first step is to do an over-haul of the command
line parsing, without profile support but with an eye towards what
will be needed for that.
In my mind this would entail:
* Convert to using the optoparse module instead of getopt.
* Express parameter value constraints in some way other than inline
in a method body, to facilitate future profile support.
* Probably do some surrounding changes, such as eliminating some dependency
issues in the way we parse arguments such that we have a more clear
"parse arguments" phase, post-processing phase, etc.
* Be careful to retain to a reasonable degree the semantics of the
current command line, including some of the "idiosyncrasies".
Any thoughts? If it sounds reasonable I'll branch out and start
working on the command line over-haul only, as a pre-cursor to profile
support.
--
/ Peter Schuller
PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller@xxxxxxxxxxxx>'
Key retrieval: Send an E-Mail to getpgpkey@xxxxxxxxx
E-Mail: peter.schuller@xxxxxxxxxxxx Web: http://www.scode.org
Attachment:
pgppe7XW3tRSj.pgp
Description: PGP signature