mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-20 09:55:10 -04:00
refactor: status command is functional
This commit is contained in:
parent
d92083b928
commit
973f8b6abc
5 changed files with 33 additions and 26 deletions
|
@ -42,7 +42,7 @@ from .html import (
|
|||
write_html_snapshot_details,
|
||||
)
|
||||
from .json import (
|
||||
load_json_snapshot_details,
|
||||
load_json_snapshot,
|
||||
parse_json_snapshot_details,
|
||||
write_json_snapshot_details,
|
||||
)
|
||||
|
@ -441,7 +441,7 @@ def get_duplicate_folders(snapshots, out_dir: Path=OUTPUT_DIR) -> Dict[str, Opti
|
|||
path = path.snapshot_dir
|
||||
|
||||
try:
|
||||
snapshot = parse_json_snapshot_details(path)
|
||||
snapshot = load_json_snapshot_details(path)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
@ -530,7 +530,7 @@ def is_valid(snapshot: Model) -> bool:
|
|||
if dir_exists and index_exists:
|
||||
try:
|
||||
# TODO: review if the `guess` was necessary here
|
||||
parsed_snapshot = parse_json_snapshot_details(snapshot.snapshot_dir)
|
||||
parsed_snapshot = load_json_snapshot(snapshot.snapshot_dir)
|
||||
return snapshot.url == parsed_snapshot.url
|
||||
except Exception:
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue