mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-23 12:43:10 +00:00
Merge pull request #206 from luoliyan/develop
Update purge script to match codebase cleanup
This commit is contained in:
commit
fd910fce39
1 changed files with 3 additions and 3 deletions
|
@ -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 = []
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue