Print inema version

This commit is contained in:
Georg Sauthoff 2019-11-22 18:27:03 +01:00
parent 824ed58d03
commit e72514697c
1 changed files with 6 additions and 0 deletions

View File

@ -189,12 +189,18 @@ It's also fine to delimit the recipient lines with newline characters.
help='update internal format list via webservice') help='update internal format list via webservice')
p.add_argument('--print', action='store_true', default=False, p.add_argument('--print', action='store_true', default=False,
help='Print the retrieved PDF with the lpr command') help='Print the retrieved PDF with the lpr command')
p.add_argument('--version', '-v', action='store_true',
help='Display inema package version')
return p return p
def parse_args(*xs): def parse_args(*xs):
arg_parser = mk_arg_parser() arg_parser = mk_arg_parser()
args = arg_parser.parse_args(*xs) args = arg_parser.parse_args(*xs)
if args.version:
print(inema.__version__)
sys.exit(0)
if args.debug: if args.debug:
setup_file_logging(args.debug) setup_file_logging(args.debug)
if not args.config: if not args.config: