aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bachelier <laurent@bachelier.name>2014-08-23 01:31:05 +0200
committerLaurent Bachelier <laurent@bachelier.name>2014-08-23 01:31:05 +0200
commit67417d6ec37d2107afb05b62dc90dc2872446f5c (patch)
tree3b40bdc953721c3d915463c195952bce286c6675
parentBetter argparse help (diff)
downloadrencon-67417d6ec37d2107afb05b62dc90dc2872446f5c.tar.xz
Simplify/fix argparse config
-rwxr-xr-xrencon4
1 files changed, 2 insertions, 2 deletions
diff --git a/rencon b/rencon
index c9e4806..30ab44f 100755
--- a/rencon
+++ b/rencon
@@ -11,9 +11,9 @@ if __name__ == '__main__':
description="Rename files based on their content.",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
- parser.add_argument('files', metavar='FILE', type=str, nargs='+',
+ parser.add_argument('files', metavar='FILE', nargs='+',
help="files to rename")
- parser.add_argument('-m', '--mask', nargs='?',
+ parser.add_argument('-m', '--mask',
help="file destination mask", default='${hash}.${ext}')
parser.add_argument('-p', '--pretend', action='store_true',
help="do not rename, just print")