1
0
mirror of https://github.com/pirate/ArchiveBox.git synced 2025-08-29 09:10:13 +02:00

Merge pull request #206 from luoliyan/develop

Update purge script to match codebase cleanup
This commit is contained in:
Nick Sweeting
2019-04-02 16:02:05 -04:00
committed by GitHub

View File

@@ -6,9 +6,9 @@ from os.path import exists, join
from shutil import rmtree from shutil import rmtree
from typing import List from typing import List
from archive import parse_json_link_index
from config import ARCHIVE_DIR, OUTPUT_DIR from config import ARCHIVE_DIR, OUTPUT_DIR
from index import write_html_links_index, write_json_links_index from index import (parse_json_links_index, write_html_links_index,
write_json_links_index)
def cleanup_index(regexes: List[str], proceed: bool, delete: bool) -> None: def cleanup_index(regexes: List[str], proceed: bool, delete: bool) -> None:
@@ -16,7 +16,7 @@ def cleanup_index(regexes: List[str], proceed: bool, delete: bool) -> None:
exit('index.json is missing; nothing to do') exit('index.json is missing; nothing to do')
compiled = [re.compile(r) for r in regexes] compiled = [re.compile(r) for r in regexes]
links = parse_json_link_index(OUTPUT_DIR)['links'] links = parse_json_links_index(OUTPUT_DIR)
filtered = [] filtered = []
remaining = [] remaining = []