Use betterhelp.

This commit is contained in:
voussoir 2022-04-07 13:48:26 -07:00
parent bb8618b414
commit 5cd856073c
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -18,6 +18,7 @@ import sys
import traceback
import warnings
from voussoirkit import betterhelp
from voussoirkit import pathclass
HTML_TEMPLATE = '''
@ -827,16 +828,32 @@ def markdown_argparse(args):
def main(argv):
parser = argparse.ArgumentParser()
parser.add_argument('md_filename')
parser.add_argument('--css', dest='css', action='append', default=None)
parser.add_argument('--embed_images', '--embed-images', dest='do_embed_images', action='store_true')
parser.add_argument('-o', '--output', dest='output_filename', default=None)
parser.add_argument('--server', dest='server', type=int, default=None)
parser.add_argument(
'--css',
action='append',
default=None,
)
parser.add_argument(
'--embed_images',
'--embed-images',
dest='do_embed_images',
action='store_true',
)
parser.add_argument(
'-o',
'--output',
dest='output_filename',
default=None,
)
parser.add_argument(
'--server',
type=int,
default=None,
)
parser.set_defaults(func=markdown_argparse)
args = parser.parse_args(argv)
return args.func(args)
return betterhelp.go(parser, argv)
if __name__ == '__main__':
raise SystemExit(main(sys.argv[1:]))