rdiff-backup-users
[Top][All Lists]
Advanced

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

Feedback required - new arguments parsing for rdiff-backup


From: Eric L. Zolf
Subject: Feedback required - new arguments parsing for rdiff-backup
Date: Sat, 2 Jan 2021 21:38:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

Hello everybody,

first, let me wish you a happy new year, health and good luck.

I'm currently working on using argparse to improve the way command line arguments are parsed, in a way compatible with the old handling while developing a new, hopefully more logical and easier to extend, approach.

The attached script is a proof-of-concept, faking the interface and printing the result (without any real action), for which I'd like to get feedback, especially regarding your daily use of rdiff-backup:

1. is the compatible interface really similar to the old command line?
2. is the output using the old and new interfaces the same? (ignoring "null" default values)
3. how do you like the new interface? any feedback is welcome.

Few more notes to get you started:

`python3 arguments.py --help` gives you the old interface
`python3 arguments.py --new --help` gives you the new one
the new interface makes more clearly the difference between actions (backup, restore, compare, etc...) and options, e.g. the old `rdiff-backup -b dir1 dir2` becomes `rdiff-backup backup dir1 dir2`. A neat trick of the new interface is the ability to create arguments files, e.g. restore.txt with one argument per line:

restore
--at
3B
repository_dir
target_dir

and use it on the command line with `python3 arguments.py @restore.txt`

I find that filtering away the null values helps to understand the output, e.g. with `| grep -v null`.

Hope you like it, let me know in both cases :-)

Thanks, Eric

Attachment: arguments.py.gz
Description: application/gzip


reply via email to

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