MCPcopy
hub / github.com/ArchiveBox/ArchiveBox / get_valid_folders

Function get_valid_folders

archivebox/index/__init__.py:449–455  ·  view source on GitHub ↗

dirs with a valid index matched to the main index and archived content

(snapshots, out_dir: Path=OUTPUT_DIR)

Source from the content-addressed store, hash-verified

447 return all_folders
448
449def get_valid_folders(snapshots, out_dir: Path=OUTPUT_DIR) -> Dict[str, Optional[Link]]:
450 """dirs with a valid index matched to the main index and archived content"""
451 links = [snapshot.as_link_with_details() for snapshot in snapshots.iterator()]
452 return {
453 link.link_dir: link
454 for link in filter(is_valid, links)
455 }
456
457def get_invalid_folders(snapshots, out_dir: Path=OUTPUT_DIR) -> Dict[str, Optional[Link]]:
458 """dirs that are invalid for any reason: corrupted/duplicate/orphaned/unrecognized"""

Callers 1

statusFunction · 0.85

Calls 1

as_link_with_detailsMethod · 0.80

Tested by

no test coverage detected