mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-14 23:24:30 -04:00
better no links found message
This commit is contained in:
parent
d8d8f7c2cc
commit
525f8beb55
2 changed files with 7 additions and 1 deletions
|
@ -122,7 +122,12 @@ def validate_links(links: Iterable[Link]) -> Iterable[Link]:
|
||||||
links = uniquefied_links(links) # merge/dedupe duplicate timestamps & urls
|
links = uniquefied_links(links) # merge/dedupe duplicate timestamps & urls
|
||||||
|
|
||||||
if not links:
|
if not links:
|
||||||
print('[X] No links found :(')
|
stderr('{red}[X] No links found in index.json{reset}'.format(**ANSI))
|
||||||
|
stderr(' To add a link to your archive, run:')
|
||||||
|
stderr(" archivebox add 'https://example.com'")
|
||||||
|
stderr()
|
||||||
|
stderr(' For more usage and examples, run:')
|
||||||
|
stderr(' archivebox help')
|
||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
|
|
||||||
return links
|
return links
|
||||||
|
|
|
@ -59,6 +59,7 @@ def log_parsing_finished(num_parsed: int, num_new_links: int, parser_name: str):
|
||||||
def log_indexing_process_started():
|
def log_indexing_process_started():
|
||||||
start_ts = datetime.now()
|
start_ts = datetime.now()
|
||||||
_LAST_RUN_STATS.index_start_ts = start_ts
|
_LAST_RUN_STATS.index_start_ts = start_ts
|
||||||
|
print()
|
||||||
print('{green}[*] [{}] Saving main index files...{reset}'.format(
|
print('{green}[*] [{}] Saving main index files...{reset}'.format(
|
||||||
start_ts.strftime('%Y-%m-%d %H:%M:%S'),
|
start_ts.strftime('%Y-%m-%d %H:%M:%S'),
|
||||||
**ANSI,
|
**ANSI,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue