fix help command output docstrings and more CLI log coloring

This commit is contained in:
Nick Sweeting 2024-09-30 18:29:17 -07:00
parent 7489663ff3
commit 31ce490321
No known key found for this signature in database
4 changed files with 21 additions and 13 deletions

View file

@ -96,20 +96,20 @@ def help(out_dir: Path=DATA_DIR) -> None:
all_subcommands = CLI_SUBCOMMANDS
COMMANDS_HELP_TEXT = '\n '.join(
f'{cmd.ljust(20)} {summary}'
for cmd, summary in all_subcommands.items()
f'{cmd.ljust(20)} {func.__doc__}'
for cmd, func in all_subcommands.items()
if cmd in meta_cmds
) + '\n\n ' + '\n '.join(
f'{cmd.ljust(20)} {summary}'
for cmd, summary in all_subcommands.items()
f'{cmd.ljust(20)} {func.__doc__}'
for cmd, func in all_subcommands.items()
if cmd in main_cmds
) + '\n\n ' + '\n '.join(
f'{cmd.ljust(20)} {summary}'
for cmd, summary in all_subcommands.items()
f'{cmd.ljust(20)} {func.__doc__}'
for cmd, func in all_subcommands.items()
if cmd in archive_cmds
) + '\n\n ' + '\n '.join(
f'{cmd.ljust(20)} {summary}'
for cmd, summary in all_subcommands.items()
f'{cmd.ljust(20)} {func.__doc__}'
for cmd, func in all_subcommands.items()
if cmd not in display_first
)
@ -127,8 +127,10 @@ def help(out_dir: Path=DATA_DIR) -> None:
{}
{lightred}Example Use:{reset}
mkdir my-archive; cd my-archive/
mkdir -p ~/archivebox/data; cd ~/archivebox/data
archivebox init
archivebox setup
archivebox version
archivebox status
archivebox add https://example.com/some/page