# HG changeset patch # User Matti Hamalainen # Date 1621936481 -10800 # Node ID cfecd039506ea12989f7d23b26c6e08f056b94b2 # Parent 4cbefe4c6f53d5ecca395f2b4b80fdc70f864231 Make word attribute separator string configurable. diff -r 4cbefe4c6f53 -r cfecd039506e lxmldump.py --- a/lxmldump.py Tue May 25 12:40:35 2021 +0300 +++ b/lxmldump.py Tue May 25 12:54:41 2021 +0300 @@ -227,7 +227,7 @@ pkk_output_subs_fmt(indent, wnode, "./Headword", "", "\"{ntext}\"") if len(tmpl) > 0: - pkk_print(" ({nlist})".format(nlist=" ; ".join(tmpl))) + pkk_print(" ({nlist})".format(nlist=pkk_cfg.word_attr_sep.join(tmpl))) pkk_print("\n") @@ -280,6 +280,12 @@ metavar="str", help='Ptr URL format string (see below)') +optparser.add_argument("--attr-sep", + dest="word_attr_sep", + type=str, default=" ; ", + metavar="str", + help='word attribute separator (default: \"%(default)s\")') + optparser.add_argument("-n", "--normalize", dest="normalize", action="store_true",