diff --git a/archivebox/legacy/logs.py b/archivebox/legacy/logs.py index 941f49d9..8b0dda9f 100644 --- a/archivebox/legacy/logs.py +++ b/archivebox/legacy/logs.py @@ -79,6 +79,7 @@ def log_indexing_finished(out_dir: str, out_file: str): def log_archiving_started(num_links: int, resume: Optional[float]): start_ts = datetime.now() _LAST_RUN_STATS.archiving_start_ts = start_ts + print() if resume: print('{green}[▶] [{}] Resuming archive updating for {} pages starting from {}...{reset}'.format( start_ts.strftime('%Y-%m-%d %H:%M:%S'), @@ -119,6 +120,7 @@ def log_archiving_finished(num_links: int): else: duration = '{0:.2f} sec'.format(seconds, 2) + print() print('{}[√] [{}] Update of {} pages complete ({}){}'.format( ANSI['green'], end_ts.strftime('%Y-%m-%d %H:%M:%S'), @@ -224,8 +226,6 @@ def log_list_finished(links): def log_removal_started(links: List[Link], yes: bool, delete: bool): - - log_list_finished(links) print('{lightyellow}[i] Found {} matching URLs to remove.{reset}'.format(len(links), **ANSI)) if delete: file_counts = [link.num_outputs for link in links if os.path.exists(link.link_dir)] diff --git a/archivebox/legacy/main.py b/archivebox/legacy/main.py index fab5a7c5..36f8cfc6 100644 --- a/archivebox/legacy/main.py +++ b/archivebox/legacy/main.py @@ -121,11 +121,15 @@ def remove_archive_links(filter_patterns: List[str], filter_type: str='exact', )) finally: timer.end() + if not len(links): log_removal_finished(0, 0) raise SystemExit(1) + + log_list_finished(links) log_removal_started(links, yes=yes, delete=delete) + timer = TimedProgress(360, prefix=' ') try: to_keep = []