summaryrefslogtreecommitdiffstats
path: root/reduce.py
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-07-15 13:48:15 +0800
committerPeng Wu <alexepico@gmail.com>2011-07-15 13:48:15 +0800
commit61be0be890cba36e4b6915d2a1311c3a946cbb29 (patch)
treea10e9afc8b0977a33069aa268d6a9aafaf465694 /reduce.py
parent842ea5e26a7a52afb8af6a53585f4a7e5ef2069a (diff)
downloadtrainer-61be0be890cba36e4b6915d2a1311c3a946cbb29.zip
trainer-61be0be890cba36e4b6915d2a1311c3a946cbb29.tar.gz
trainer-61be0be890cba36e4b6915d2a1311c3a946cbb29.tar.xz
add helps to reduce.py
Diffstat (limited to 'reduce.py')
-rwxr-xr-xreduce.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/reduce.py b/reduce.py
index 5fa3731..6ef834b 100755
--- a/reduce.py
+++ b/reduce.py
@@ -47,9 +47,12 @@ def iterateSubDirectory(oldroot, newroot, level):
if __name__ == '__main__':
parser = ArgumentParser(description='Reduce the categories.')
- parser.add_argument('--level', action='store', nargs=1, default=2)
- parser.add_argument('origdir', action='store')
- parser.add_argument('destdir', action='store')
+ parser.add_argument('--level', action='store', nargs=1, default=2, \
+ help='reduce to n levels of index')
+ parser.add_argument('origdir', action='store', \
+ help='original index directory')
+ parser.add_argument('destdir', action='store', \
+ help='reduced index directory')
args = parser.parse_args()
iterateSubDirectory(args.origdir, args.destdir, int(args.level[0]))