polish up backup.py arguments
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Thu, 2 Mar 2017 14:41:42 +0000 (15:41 +0100)
committerPhilipp Gesang <philipp.gesang@intra2net.com>
Thu, 2 Mar 2017 14:54:44 +0000 (15:54 +0100)
These are about the only high-level clues regarding its
functionality so it may as well be presented right.

backup.py

index 3566967..7a7e7dc 100644 (file)
--- 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()