comparison lxmldump.py @ 68:d53f46341864

Show copyright blurb in help.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 11 Oct 2021 22:13:40 +0300
parents 9833df4573a7
children f887d8a68e5e
comparison
equal deleted inserted replaced
67:9833df4573a7 68:d53f46341864
467 ### Main program starts 467 ### Main program starts
468 ### 468 ###
469 signal.signal(signal.SIGINT, pkk_signal_handler) 469 signal.signal(signal.SIGINT, pkk_signal_handler)
470 470
471 optparser = argparse.ArgumentParser( 471 optparser = argparse.ArgumentParser(
472 description="lxmldump - Convert and dump ISO/FDIS 1951 XML file data",
473 usage="%(prog)s [options] <input xml file(s)>", 472 usage="%(prog)s [options] <input xml file(s)>",
474 add_help=False 473 add_help=False
475 ) 474 )
476 475
477 optparser.add_argument("filenames", 476 optparser.add_argument("filenames",
521 pkk_cfg = optparser.parse_args() 520 pkk_cfg = optparser.parse_args()
522 521
523 522
524 ### Show help if needed 523 ### Show help if needed
525 if len(pkk_cfg.filenames) == 0 or pkk_cfg.show_help: 524 if len(pkk_cfg.filenames) == 0 or pkk_cfg.show_help:
525 print("lxmldump - Convert and dump ISO/FDIS 1951 XML file data\n"
526 "Programmed and designed by Matti 'ccr' Hämäläinen <ccr@tnsp.org>\n"
527 "(C) Copyright 2021 Tecnic Software productions (TNSP)\n")
526 optparser.print_help() 528 optparser.print_help()
527 print(u"\nAvailable output modes:") 529 print(u"\nAvailable output modes:")
528 print(" " + ", ".join(pkk_modes_list.values())) 530 print(" " + ", ".join(pkk_modes_list.values()))
529 531
530 if pkk_cfg.mode not in [PKK_MODE_NORMAL, PKK_MODE_ANKI]: 532 if pkk_cfg.mode not in [PKK_MODE_NORMAL, PKK_MODE_ANKI]: