Tidy up svgrender helptext, argparser.

This commit is contained in:
voussoir 2021-11-14 22:00:10 -08:00
parent d8d7807280
commit eefbc3f8aa
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -10,6 +10,7 @@ should be on your PATH.
scales: scales:
One or more integers. Each integer will be the size of one output file. One or more integers. Each integer will be the size of one output file.
flags:
--destination: --destination:
A path to a directory where the png files should be saved. By default, A path to a directory where the png files should be saved. By default,
they go to the same folder as the svg file. they go to the same folder as the svg file.
@ -96,7 +97,7 @@ def main(argv):
parser.add_argument('svg_filepath') parser.add_argument('svg_filepath')
parser.add_argument('scales', nargs='+') parser.add_argument('scales', nargs='+')
parser.add_argument('--destination', nargs='?', default=None) parser.add_argument('--destination', default=None)
parser.add_argument('--y', dest='y', action='store_true') parser.add_argument('--y', dest='y', action='store_true')
parser.add_argument('--basename_only', '--basename-only', dest='scale_suffix', action='store_false') parser.add_argument('--basename_only', '--basename-only', dest='scale_suffix', action='store_false')
parser.set_defaults(func=svgrender_argparse) parser.set_defaults(func=svgrender_argparse)