rename archivebox setup to archivebox install

This commit is contained in:
Nick Sweeting 2024-09-30 23:19:11 -07:00
parent 4334c74548
commit 8c3342afe5
No known key found for this signature in database
5 changed files with 26 additions and 27 deletions

View file

@ -12,8 +12,7 @@ from typing import Optional, List, IO, Union, Iterable
from pathlib import Path
from archivebox.config import DATA_DIR
from ..misc.checks import check_data_folder, check_migrations
from ..misc.logging import stderr
from archivebox.misc.logging import stderr
from importlib import import_module
@ -21,6 +20,10 @@ BUILTIN_LIST = list
CLI_DIR = Path(__file__).resolve().parent
# rewrite setup -> install for backwards compatibility
if sys.argv[1] == 'setup':
sys.argv[1] = 'install'
# def list_subcommands() -> Dict[str, str]:
# """find and import all valid archivebox_<subcommand>.py files in CLI_DIR"""
@ -46,7 +49,7 @@ SUBCOMMAND_MODULES = {
'init': 'archivebox_init',
'config': 'archivebox_config',
'setup': 'archivebox_setup',
'install': 'archivebox_install',
'add': 'archivebox_add',
'remove': 'archivebox_remove',
@ -98,7 +101,7 @@ CLI_SUBCOMMANDS = LazySubcommands()
# these common commands will appear sorted before any others for ease-of-use
meta_cmds = ('help', 'version') # dont require valid data folder at all
main_cmds = ('init', 'config', 'setup') # dont require existing db present
main_cmds = ('init', 'config', 'setup', 'install') # dont require existing db present
archive_cmds = ('add', 'remove', 'update', 'list', 'status') # require existing db present
fake_db = ("oneshot",) # use fake in-memory db