MCPcopy
hub / github.com/ArchiveBox/ArchiveBox / manage

Function manage

archivebox/main.py:1349–1360  ·  view source on GitHub ↗

Run an ArchiveBox Django management command

(args: Optional[List[str]]=None, out_dir: Path=OUTPUT_DIR)

Source from the content-addressed store, hash-verified

1347
1348@enforce_types
1349def manage(args: Optional[List[str]]=None, out_dir: Path=OUTPUT_DIR) -> None:
1350 """Run an ArchiveBox Django management command"""
1351
1352 check_data_folder(out_dir=out_dir)
1353 from django.core.management import execute_from_command_line
1354
1355 if (args and "createsuperuser" in args) and (IN_DOCKER and not IS_TTY):
1356 stderr('[!] Warning: you need to pass -it to use interactive commands in docker', color='lightyellow')
1357 stderr(' docker run -it archivebox manage {}'.format(' '.join(args or ['...'])), color='lightyellow')
1358 stderr()
1359
1360 execute_from_command_line([f'{ARCHIVEBOX_BINARY} manage', *(args or ['help'])])
1361
1362
1363@enforce_types

Callers 1

mainFunction · 0.85

Calls 2

check_data_folderFunction · 0.85
stderrFunction · 0.85

Tested by

no test coverage detected