Mercurial > hg > lxmldump
changeset 41:98c85c0b5159
Improve help.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 26 May 2021 02:18:47 +0300 |
parents | bc8d8ef4a248 |
children | 508de0f6836b |
files | lxmldump.py |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lxmldump.py Wed May 26 02:02:55 2021 +0300 +++ b/lxmldump.py Wed May 26 02:18:47 2021 +0300 @@ -430,10 +430,16 @@ print(u"\nAvailable output modes:") print(" " + ", ".join(pkk_modes_list.values())) - print(u"\nAvailable format strings and values:") + if pkk_cfg.mode not in [PKK_MODE_NORMAL, PKK_MODE_ANKI]: + pkk_cfg.mode = PKK_MODE_NORMAL + + print(u"\nAvailable format strings and values (mode '{}'):".format( + pkk_modes_list[pkk_cfg.mode])) + for mid in pkk_mode_defaults: - stmp = pkk_mode_defaults[mid][PKK_MODE_NORMAL].replace("\\", "\\\\").replace("\n", "\\n") + stmp = pkk_get_value(mid).replace("\\", "\\\\").replace("\n", "\\n") print(u" {:18s} : '{}'".format(mid, stmp)) + sys.exit(0)