From: Philipp Gesang Date: Thu, 2 Mar 2017 14:41:42 +0000 (+0100) Subject: polish up backup.py arguments X-Git-Tag: v2.2~7^2~235 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=47fb2d6711ba07b6892115d294592597de0aabaa;p=python-delta-tar polish up backup.py arguments These are about the only high-level clues regarding its functionality so it may as well be presented right. --- diff --git a/backup.py b/backup.py index 3566967..7a7e7dc 100644 --- a/backup.py +++ b/backup.py @@ -72,25 +72,42 @@ if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("-m", "--mode", default='', - help="Mode in which to read/write the backup") - parser.add_argument("-t", "--targetpath", help="target path directory") - parser.add_argument("-s", "--sourcepath", help="source path directory") - parser.add_argument("-p", "--password", default='', help="password") - parser.add_argument("-v", "--volsize", default=None, help="maximum volume size, in Megabytes") - parser.add_argument("-r", "--restore", action='store_true', help="Restore a backup") - parser.add_argument("-f", "--full", action='store_true', help="Create a full backup") - parser.add_argument("-d", "--diff", action='store_true', help="Create a diff backup") - parser.add_argument("-i", "--indexes", nargs='+', help="indexes paths") - parser.add_argument("-l", "--list-files", action='store_true', help="List files in a tarball") + help= + """Mode in which to read/write the backup. + Valid modes are: + '' open uncompressed; + 'gz' open with gzip compression; + 'bz2' open with bzip2 compression; + '#gz.aes128' open an aes128 encrypted stream of gzip + compressed tar blocks; + '#aes128' open an aes128 encrypted stream of tar + blocks. + """) + parser.add_argument("-t", "--targetpath", help="Target path directory.") + parser.add_argument("-s", "--sourcepath", help="Source path directory.") + parser.add_argument("-p", "--password", default='', + help="Password for symmetric encryption.") + parser.add_argument("-v", "--volsize", default=None, + help="Maximum volume size, in megabytes.") + parser.add_argument("-r", "--restore", action='store_true', + help="Restore a backup.") + parser.add_argument("-f", "--full", action='store_true', + help="Create a full backup.") + parser.add_argument("-d", "--diff", action='store_true', + help="Create a diff backup.") + parser.add_argument("-i", "--indexes", nargs='+', help="Indexes paths.") + parser.add_argument("-l", "--list-files", action='store_true', + help="List files in a tarball.") parser.add_argument("-x", "--excluded", nargs='+', default=[], - help="excluded files") + help="Files to exclude from backup.") parser.add_argument("-inc", "--included", nargs='+', default=[], - help="included files") + help="Files to include in the backup.") parser.add_argument("-ip", "--included-path", default=None, - help="path to the file containing included paths") + help="Path to a file containing a list of included paths.") parser.add_argument("-xp", "--excluded-path", default=None, - help="path to the file containing excluded paths") - parser.add_argument("-e", "--equals", action='store_true', help="Checks two dirs are equal") + help="Path to a file containing a list of excluded paths.") + parser.add_argument("-e", "--equals", action='store_true', + help="Check if two dirs are equal.") args = parser.parse_args()