MCPcopy
hub / github.com/ArchiveBox/ArchiveBox / check_data_folder

Function check_data_folder

archivebox/config.py:1310–1325  ·  view source on GitHub ↗
(out_dir: Union[str, Path, None]=None, config: ConfigDict=CONFIG)

Source from the content-addressed store, hash-verified

1308
1309
1310def check_data_folder(out_dir: Union[str, Path, None]=None, config: ConfigDict=CONFIG) -> None:
1311 output_dir = out_dir or config['OUTPUT_DIR']
1312 assert isinstance(output_dir, (str, Path))
1313
1314 archive_dir_exists = (Path(output_dir) / ARCHIVE_DIR_NAME).exists()
1315 if not archive_dir_exists:
1316 stderr('[X] No archivebox index found in the current directory.', color='red')
1317 stderr(f' {output_dir}', color='lightyellow')
1318 stderr()
1319 stderr(' {lightred}Hint{reset}: Are you running archivebox in the right folder?'.format(**config['ANSI']))
1320 stderr(' cd path/to/your/archive/folder')
1321 stderr(' archivebox [command]')
1322 stderr()
1323 stderr(' {lightred}Hint{reset}: To create a new archive collection or import existing data in this folder, run:'.format(**config['ANSI']))
1324 stderr(' archivebox init')
1325 raise SystemExit(2)
1326
1327def check_migrations(out_dir: Union[str, Path, None]=None, config: ConfigDict=CONFIG):
1328 output_dir = out_dir or config['OUTPUT_DIR']

Callers 13

statusFunction · 0.85
addFunction · 0.85
removeFunction · 0.85
updateFunction · 0.85
list_allFunction · 0.85
list_linksFunction · 0.85
list_foldersFunction · 0.85
configFunction · 0.85
scheduleFunction · 0.85
serverFunction · 0.85
manageFunction · 0.85
shellFunction · 0.85

Calls 1

stderrFunction · 0.85

Tested by

no test coverage detected