mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-10 06:34:16 +00:00
Add CLI hints to add and schedule jobs
This commit is contained in:
parent
a3fd8a8ecd
commit
ba4342dadf
1 changed files with 8 additions and 0 deletions
|
@ -97,6 +97,8 @@ from .config import (
|
|||
check_data_folder,
|
||||
write_config_file,
|
||||
VERSION,
|
||||
VERSION_RELEASES,
|
||||
CAN_UPGRADE,
|
||||
COMMIT_HASH,
|
||||
CODE_LOCATIONS,
|
||||
EXTERNAL_LOCATIONS,
|
||||
|
@ -681,6 +683,9 @@ def add(urls: Union[str, List[str]],
|
|||
snapshot.save()
|
||||
# print(f' √ Tagged {len(imported_links)} Snapshots with {len(tags)} tags {tags_str}')
|
||||
|
||||
if CAN_UPGRADE:
|
||||
hint(f"There's a new version of ArchiveBox available! Your current version is {VERSION}. You can upgrade to {VERSION_RELEASES['upgrade_version']['tag_name']} ({VERSION_RELEASES['upgrade_version']['html_url']}). For more on how to upgrade: https://github.com/ArchiveBox/ArchiveBox/wiki/Upgrading-or-Merging-Archives\n")
|
||||
|
||||
|
||||
return all_links
|
||||
|
||||
|
@ -1270,6 +1275,9 @@ def schedule(add: bool=False,
|
|||
print('\n{green}[√] Stopped.{reset}'.format(**ANSI))
|
||||
raise SystemExit(1)
|
||||
|
||||
if CAN_UPGRADE:
|
||||
hint(f"There's a new version of ArchiveBox available! Your current version is {VERSION}. You can upgrade to {VERSION_RELEASES['upgrade_version']['tag_name']} ({VERSION_RELEASES['upgrade_version']['html_url']}). For more on how to upgrade: https://github.com/ArchiveBox/ArchiveBox/wiki/Upgrading-or-Merging-Archives\n")
|
||||
|
||||
|
||||
@enforce_types
|
||||
def server(runserver_args: Optional[List[str]]=None,
|
||||
|
|
Loading…
Reference in a new issue