From ec5609a09a5e3134116cbab19abf5d79db04b22f Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Tue, 18 Aug 2020 04:39:39 -0400 Subject: [PATCH] fix resume flag on archivebox update --- archivebox/main.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/archivebox/main.py b/archivebox/main.py index c40f5acc..06b573c4 100644 --- a/archivebox/main.py +++ b/archivebox/main.py @@ -706,6 +706,15 @@ def update(resume: Optional[float]=None, # Step 3: Run the archive methods for each link to_archive = new_links if only_new else all_links + if resume: + to_archive = [ + link for link in to_archive + if link.timestamp >= str(resume) + ] + if not to_archive: + print(f'[√] Nothing found to resume after {resume}.') + return all_links + archive_links(to_archive, overwrite=overwrite, out_dir=out_dir) # Step 4: Re-write links index with updated titles, icons, and resources