Argument processing

This commit is contained in:
Star Brilliant 2013-09-15 09:39:05 +08:00
parent 4bfd43b2db
commit bba3370d8c

12
convert.py Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env python3
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('-o', '--output', metavar='OUTPUT', help='Output file')
parser.add_argument('-s', '--size', metavar='WIDTHxHEIGHT', required=True, help='Stage size in pixels')
parser.add_argument('-r', '--reduce', action='store_true', help='Reduce the amount of danmakus if stage is full')
parser.add_argument('file', metavar='FILE', nargs='+', help='Comment file to be processed')
args = parser.parse_args()
print(repr(args))