1
0
Fork 0
mirror of synced 2024-06-28 19:10:33 +12:00

colorize hints in CLI output more consistently

This commit is contained in:
Nick Sweeting 2020-06-30 01:48:41 -04:00
parent c68543af74
commit 44bd6866ac
2 changed files with 7 additions and 6 deletions

View file

@ -19,10 +19,11 @@ from ..config import (
ConfigDict,
PYTHON_ENCODING,
ANSI,
OUTPUT_DIR,
IS_TTY,
SHOW_PROGRESS,
TERM_WIDTH,
OUTPUT_DIR,
HTML_INDEX_FILENAME,
)
@ -221,8 +222,8 @@ def log_archiving_paused(num_links: int, idx: int, timestamp: str):
total=num_links,
))
print()
print(' To view your archive, open:')
print(' {}/index.html'.format(OUTPUT_DIR))
print(' {lightred}Hint:{reset} To view your archive index, open:'.format(**ANSI))
print(' {}/{}'.format(OUTPUT_DIR, HTML_INDEX_FILENAME))
print(' Continue archiving where you left off by running:')
print(' archivebox update --resume={}'.format(timestamp))
@ -248,8 +249,8 @@ def log_archiving_finished(num_links: int):
print(' - {} links updated'.format(_LAST_RUN_STATS.succeeded))
print(' - {} links had errors'.format(_LAST_RUN_STATS.failed))
print()
print(' To view your archive, open:')
print(' {}/index.html'.format(OUTPUT_DIR))
print(' {lightred}Hint:{reset} To view your archive index, open:'.format(**ANSI))
print(' {}/{}'.format(OUTPUT_DIR, HTML_INDEX_FILENAME))
print(' Or run the built-in webserver:')
print(' archivebox server')

View file

@ -377,7 +377,7 @@ def init(force: bool=False, out_dir: str=OUTPUT_DIR) -> None:
else:
print('{green}[√] Done. A new ArchiveBox collection was initialized ({} links).{reset}'.format(len(all_links), **ANSI))
print()
print(' To view your archive index, open:')
print(' {lightred}Hint:{reset}To view your archive index, open:'.format(**ANSI))
print(' {}'.format(os.path.join(out_dir, HTML_INDEX_FILENAME)))
print()
print(' To add new links, you can run:')