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, ConfigDict,
PYTHON_ENCODING, PYTHON_ENCODING,
ANSI, ANSI,
OUTPUT_DIR,
IS_TTY, IS_TTY,
SHOW_PROGRESS, SHOW_PROGRESS,
TERM_WIDTH, 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, total=num_links,
)) ))
print() print()
print(' To view your archive, open:') print(' {lightred}Hint:{reset} To view your archive index, open:'.format(**ANSI))
print(' {}/index.html'.format(OUTPUT_DIR)) print(' {}/{}'.format(OUTPUT_DIR, HTML_INDEX_FILENAME))
print(' Continue archiving where you left off by running:') print(' Continue archiving where you left off by running:')
print(' archivebox update --resume={}'.format(timestamp)) 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 updated'.format(_LAST_RUN_STATS.succeeded))
print(' - {} links had errors'.format(_LAST_RUN_STATS.failed)) print(' - {} links had errors'.format(_LAST_RUN_STATS.failed))
print() print()
print(' To view your archive, open:') print(' {lightred}Hint:{reset} To view your archive index, open:'.format(**ANSI))
print(' {}/index.html'.format(OUTPUT_DIR)) print(' {}/{}'.format(OUTPUT_DIR, HTML_INDEX_FILENAME))
print(' Or run the built-in webserver:') print(' Or run the built-in webserver:')
print(' archivebox server') print(' archivebox server')

View file

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