add archivebox info command to scan data dir

This commit is contained in:
Nick Sweeting 2019-04-22 14:34:30 -04:00
parent 50b947f41d
commit ab68819332
4 changed files with 105 additions and 3 deletions
archivebox/legacy/storage

View file

@ -27,7 +27,6 @@ MAIN_INDEX_HEADER = {
'copyright_info': FOOTER_INFO,
'meta': {
'project': 'ArchiveBox',
'cmd': sys.argv,
'version': VERSION,
'git_sha': GIT_SHA,
'website': 'https://ArchiveBox.io',
@ -72,6 +71,7 @@ def write_json_main_index(links: List[Link], out_dir: str=OUTPUT_DIR) -> None:
**MAIN_INDEX_HEADER,
'num_links': len(links),
'updated': datetime.now(),
'last_run_cmd': sys.argv,
'links': links,
}
atomic_write(main_index_json, os.path.join(out_dir, JSON_INDEX_FILENAME))