mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-10 06:34:16 +00:00
small type fixes
This commit is contained in:
parent
319179bb71
commit
cac3912439
2 changed files with 10 additions and 8 deletions
|
@ -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__)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue