diff --git a/archivebox/cli/__init__.py b/archivebox/cli/__init__.py index 83055e8e..dd07fc51 100644 --- a/archivebox/cli/__init__.py +++ b/archivebox/cli/__init__.py @@ -5,7 +5,7 @@ import os import sys import argparse -from typing import Optional, Dict, List, IO +from typing import Optional, Dict, List, IO, Union from pathlib import Path from ..config import OUTPUT_DIR @@ -17,7 +17,7 @@ CLI_DIR = Path(__file__).resolve().parent # these common commands will appear sorted before any others for ease-of-use meta_cmds = ('help', 'version') main_cmds = ('init', 'info', 'config') -archive_cmds = ('add', 'remove', 'update', 'list') +archive_cmds = ('add', 'remove', 'update', 'list', 'status') display_first = (*meta_cmds, *main_cmds, *archive_cmds) @@ -56,7 +56,7 @@ def list_subcommands() -> Dict[str, str]: def run_subcommand(subcommand: str, subcommand_args: List[str]=None, stdin: Optional[IO]=None, - pwd: Optional[str]=None) -> None: + pwd: Union[Path, str, None]=None) -> None: """Run a given ArchiveBox subcommand with the given list of args""" module = import_module('.archivebox_{}'.format(subcommand), __package__) diff --git a/archivebox/config/__init__.py b/archivebox/config/__init__.py index 48942021..88f6b769 100644 --- a/archivebox/config/__init__.py +++ b/archivebox/config/__init__.py @@ -26,13 +26,15 @@ from .stubs import ( ) # precedence order for config: -# 1. cli args -# 2. shell environment vars -# 3. config file -# 4. defaults +# 1. cli args (e.g. ) +# 2. shell environment vars (env USE_COLOR=False archivebox add '...') +# 3. config file (echo "SAVE_FAVICON=False" >> ArchiveBox.conf) +# 4. defaults (defined below in Python) -# env USE_COLO=false archivebox add '...' +# # env SHOW_PROGRESS=1 archivebox add '...' +# archivebox config --set TIMEOUT=600 +# # ****************************************************************************** # Documentation: https://github.com/pirate/ArchiveBox/wiki/Configuration