75b75a1d55
Show command name in header of help text.
2023-09-04 13:26:07 -07:00
19f69473c8
Add AppendAction to store_types.
2022-04-30 07:21:57 -07:00
956b3c6053
Handle the case in which colorama is not installed.
2022-03-23 14:38:15 -07:00
c7f4d1dbf9
Respect the user's NO_COLOR environment variable.
2022-03-10 11:19:36 -08:00
232398eff0
Big updates to betterhelp.
...
Instead of handwriting the help text, which was time consuming and
prone to errors, I'm finally using the help parameter in
parser.add_argument. betterhelp will render and colorize this for
some good-looking automatic help text.
The make_helptext function is still extremely long and would be nice
to refactor, but I've been sitting on this commit for a few weeks now
and I want to get my git repositories back in sync.
2022-02-21 14:33:22 -08:00
1c1bb49cb8
Add ----- between epilogues.
2021-11-18 17:06:00 -08:00
8cb50d8cac
Add betterhelp epilogue feature, flatten some logic.
2021-11-07 19:25:37 -08:00
40410496fc
Alphabetize functions.
2021-11-07 18:59:32 -08:00
d3a1578cca
Add some type annotations to test the waters.
2021-08-22 20:48:34 -07:00
98ee6e82c6
Improve various docstrings.
2021-08-22 20:46:12 -07:00
ac6149094d
Add a few docstrings, remove getpermission.py.
2021-01-13 16:37:28 -08:00
3ef4b31c46
Print log warning when subparser has no docstring.
2021-01-13 16:11:45 -08:00
593dfe5cb0
Add optional args_postprocessor.
2020-12-30 12:31:21 -08:00
62b44be0d5
Print betterhelp to stderr, not stdout.
2020-12-07 20:09:36 -08:00
Ethan Dalool
d56eea85e6
Fix punctuation of these statements.
2020-10-08 09:39:41 -07:00
Ethan Dalool
a14902d124
Fix can_use_bare incorrectly handling nargs=* arguments.
2020-08-20 11:39:04 -07:00
Ethan Dalool
169c944c38
Add easy mains suitable for most simple use cases.
2020-03-10 22:40:12 -07:00
Ethan Dalool
6eb43fb69d
Rename betterhelp decorator to single_betterhelp, organize funcs.
2020-03-10 22:34:53 -07:00
Ethan Dalool
87ab04abab
Add support for parsers that can be used bare, no required args.
2020-02-07 12:33:46 -08:00
Ethan Dalool
0d6e5d4a13
Let subparser_betterhelp inspect parser for aliases.
2020-01-30 19:29:39 -08:00
Ethan Dalool
31048fc89a
Add functools.wraps.
2020-01-30 19:01:31 -08:00
Ethan Dalool
22febf2ef7
Add docstring to add_previews.
2020-01-30 19:00:22 -08:00
Ethan Dalool
35e0527222
Improve these variable names for clarity.
2020-01-30 18:54:41 -08:00
Ethan Dalool
895a223359
Add docstring to docstring_preview.
2020-01-30 18:54:25 -08:00
Ethan Dalool
0ccd269cc2
Strip resultant preview, let the caller organize whitespace.
2020-01-30 18:51:43 -08:00
Ethan Dalool
73483838c9
Remove bespoke indent function. Honestly just use textwrap.
2020-01-30 18:48:10 -08:00
Ethan Dalool
dc64fc3c47
Move helpstrings to global constant.
2020-01-30 18:46:47 -08:00
Ethan Dalool
07da8dd413
Add betterhelp.py
2019-08-06 23:42:04 -07:00