Mercurial > cgi-bin > hgweb.cgi > curlyq
diff curlyq @ 8:05363e803272 v1_workspace
Improve help text.
author | David Barts <n5jrn@me.com> |
---|---|
date | Thu, 26 Dec 2019 21:54:10 -0800 |
parents | d5198c7ec54d |
children | 397c178c5b98 |
line wrap: on
line diff
--- a/curlyq Thu Dec 26 20:56:38 2019 -0800 +++ b/curlyq Thu Dec 26 21:54:10 2019 -0800 @@ -66,15 +66,16 @@ # M a i n P r o g r a m # Parse arguments -parser = argparse.ArgumentParser(description='Make straight quotes curly.', prog=MYNAME) +parser = argparse.ArgumentParser( + description='Make straight quotes curly.', prog=MYNAME) group = parser.add_mutually_exclusive_group() group.add_argument("--flowed", action="store_true", help="Input is flowed text.") group.add_argument("--html", action="store_true", help="Input is HTML.") group.add_argument("--uncurl", action="store_true", help="Uncurl quotes instead of curling them.") parser.add_argument("--force", action="store_true", help="Force all quotes to straight ones first.") -parser.add_argument("--icoding", default="UTF-8", help="Input encoding.") +parser.add_argument("--icoding", default="UTF-8", help="Input encoding (default UTF-8).") parser.add_argument("--inplace", action="store_true", help="Edit file in-place.") -parser.add_argument("--ocoding", default="UTF-8", help="Output encoding.") +parser.add_argument("--ocoding", default="UTF-8", help="Output encoding (default UTF-8).") parser.add_argument("input", nargs="?", help="Input file.") parser.add_argument("output", nargs="?", help="Output file.") try: @@ -90,7 +91,7 @@ sys.stderr.write("{0}: {1!s}\n".format(MYNAME, e)) sys.exit(2) if not CODECS_TO_NAME.get(codec, "").startswith("UTF-"): - sys.stderr.write("{0}: {1!s} output coding does not support Unicode\n".format(MYNAME, args.ocoding)) + sys.stderr.write("{0}: {1!r} output coding does not support Unicode\n".format(MYNAME, args.ocoding)) sys.exit(1) del codec