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

@ -1,8 +1,9 @@
__package__ = 'archivebox'
import sys
import shutil
import django
import pydantic
import shutil
import django_stubs_ext
@ -21,9 +22,12 @@ timezone.utc = datetime.timezone.utc
# Install rich for pretty tracebacks in console logs
# https://rich.readthedocs.io/en/stable/traceback.html#traceback-handler
from rich.traceback import install
install(show_locals=True, word_wrap=False, locals_max_length=10, locals_hide_dunder=True, suppress=[django, pydantic], extra_lines=2, width=shutil.get_terminal_size((100, 10)).columns - 1)
TERM_WIDTH = (shutil.get_terminal_size((200, 10)).columns - 1) if sys.stdout.isatty() else 200
# os.environ.setdefault('COLUMNS', str(TERM_WIDTH))
install(show_locals=True, word_wrap=False, locals_max_length=10, locals_hide_dunder=True, suppress=[django, pydantic], extra_lines=2, width=TERM_WIDTH)
from daphne import access