Mercurial > hg > lxmldump
comparison lxmldump.py @ 41:98c85c0b5159
Improve help.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 26 May 2021 02:18:47 +0300 |
parents | bc8d8ef4a248 |
children | 508de0f6836b |
comparison
equal
deleted
inserted
replaced
40:bc8d8ef4a248 | 41:98c85c0b5159 |
---|---|
428 if len(pkk_cfg.filenames) == 0 or pkk_cfg.show_help: | 428 if len(pkk_cfg.filenames) == 0 or pkk_cfg.show_help: |
429 optparser.print_help() | 429 optparser.print_help() |
430 print(u"\nAvailable output modes:") | 430 print(u"\nAvailable output modes:") |
431 print(" " + ", ".join(pkk_modes_list.values())) | 431 print(" " + ", ".join(pkk_modes_list.values())) |
432 | 432 |
433 print(u"\nAvailable format strings and values:") | 433 if pkk_cfg.mode not in [PKK_MODE_NORMAL, PKK_MODE_ANKI]: |
434 pkk_cfg.mode = PKK_MODE_NORMAL | |
435 | |
436 print(u"\nAvailable format strings and values (mode '{}'):".format( | |
437 pkk_modes_list[pkk_cfg.mode])) | |
438 | |
434 for mid in pkk_mode_defaults: | 439 for mid in pkk_mode_defaults: |
435 stmp = pkk_mode_defaults[mid][PKK_MODE_NORMAL].replace("\\", "\\\\").replace("\n", "\\n") | 440 stmp = pkk_get_value(mid).replace("\\", "\\\\").replace("\n", "\\n") |
436 print(u" {:18s} : '{}'".format(mid, stmp)) | 441 print(u" {:18s} : '{}'".format(mid, stmp)) |
442 | |
437 sys.exit(0) | 443 sys.exit(0) |
438 | 444 |
439 | 445 |
440 ### Handle each input file | 446 ### Handle each input file |
441 for filename in pkk_cfg.filenames: | 447 for filename in pkk_cfg.filenames: |