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

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

Re: Feedback required - new arguments parsing for rdiff-backup


From: Dominic Raferd
Subject: Re: Feedback required - new arguments parsing for rdiff-backup
Date: Tue, 5 Jan 2021 11:39:53 +0000
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0



On 02/01/2021 20:38, Eric L. Zolf wrote:
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


Thanks Eric for all your great work on rdiff-backup over the last year (I now use v2.0.5 on Ubuntu 20.04 and Windows [latter only as client], it works great), and all the best for 2021.

But when I try arguments.py I get this:
# python3 --version
Python 3.8.5
# python3 ./arguments.py --help
Traceback (most recent call last):
  File "./arguments.py", line 120, in <module>
    "--fsync", default=True, action=argparse.BooleanOptionalAction,
AttributeError: module 'argparse' has no attribute 'BooleanOptionalAction'



reply via email to

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