(out_dir: Union[str, Path, None]=None, config: ConfigDict=CONFIG)
| 1308 | |
| 1309 | |
| 1310 | def 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 | |
| 1327 | def check_migrations(out_dir: Union[str, Path, None]=None, config: ConfigDict=CONFIG): |
| 1328 | output_dir = out_dir or config['OUTPUT_DIR'] |
no test coverage detected