This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
md-pdf/md_pdf/args.py

12 lines
464 B
Python
Raw Normal View History

2017-03-29 18:26:54 +01:00
import argparse
2017-05-27 14:20:39 +01:00
from md_pdf import __version__
2017-03-29 18:26:54 +01:00
def parse_args():
parser = argparse.ArgumentParser()
2017-04-05 16:24:12 +01:00
parser.add_argument("-v", "--verbose", help="Set verbosity level (repeat argument)", action="count", default=0)
2017-03-29 22:18:01 +01:00
parser.add_argument("--update-csl", help="Update CSL files", action="store_true")
2017-05-27 14:20:39 +01:00
parser.add_argument("--version", action="version", version="%(prog)s {}".format(__version__))
2017-03-31 17:52:30 +01:00
parser.add_help = True
2017-03-29 18:26:54 +01:00
return parser.parse_args()