kotlin-argparser icon indicating copy to clipboard operation
kotlin-argparser copied to clipboard

Help section titles should be capitalized

Open holgerbrandl opened this issue 6 years ago • 2 comments

I guess there is no real consistent scheme, but quite a few tools capitalize the help section headers. So maybe a flag could be added to do the same when using kotlin-argparser.

So showiing

Usage: [-h] [-a] IMAGE-DIRECTORY MARKDOWN-FILES...

Optional arguments:
  -h, --help        show this help message and exit

  -a, --auto        Automatically remove orphan images


Positional arguments:

instead of

usage: [-h] [-a] IMAGE-DIRECTORY MARKDOWN-FILES...

optional arguments:
  -h, --help        show this help message and exit

  -a, --auto        Automatically remove orphan images


positional arguments:

holgerbrandl avatar Sep 07 '18 13:09 holgerbrandl

That part of the formatting is modeled after Python's argparse module. As you mention, there isn't a lot of consistency around this.

What do you think about adding parameters for the various headers to DefaultHelpFormatter? Then one could not only change the capitalization, but even change the language for a non-English (or internationalized) application. (That doesn't solve I18n for error messages, though.)

xenomachina avatar Sep 07 '18 17:09 xenomachina

Adding a capitalization parameter to the help-formatter would be a great improvement imho.

holgerbrandl avatar Sep 10 '18 06:09 holgerbrandl