diff --git a/archivebox/cli/archivebox_schedule.py b/archivebox/cli/archivebox_schedule.py index d4747906..f606979b 100644 --- a/archivebox/cli/archivebox_schedule.py +++ b/archivebox/cli/archivebox_schedule.py @@ -39,6 +39,12 @@ def main(args: Optional[List[str]]=None, stdin: Optional[IO]=None, pwd: Optional default=None, help='Run ArchiveBox once every [timeperiod] (hour/day/month/year or cron format e.g. "0 0 * * *")', ) + parser.add_argument( + '--tag', '-t', + type=str, + default='', + help="Tag the added URLs with the provided tags e.g. --tag=tag1,tag2,tag3", + ) parser.add_argument( '--depth', # '-d', type=int, @@ -97,6 +103,7 @@ def main(args: Optional[List[str]]=None, stdin: Optional[IO]=None, pwd: Optional run_all=command.run_all, quiet=command.quiet, every=command.every, + tag=command.tag, depth=command.depth, overwrite=command.overwrite, update=command.update, diff --git a/archivebox/main.py b/archivebox/main.py index d80203b2..0c98c991 100755 --- a/archivebox/main.py +++ b/archivebox/main.py @@ -1170,6 +1170,7 @@ def schedule(add: bool=False, run_all: bool=False, quiet: bool=False, every: Optional[str]=None, + tag: str='', depth: int=0, overwrite: bool=False, update: bool=not ONLY_NEW, @@ -1203,6 +1204,7 @@ def schedule(add: bool=False, 'add', *(['--overwrite'] if overwrite else []), *(['--update'] if update else []), + *([f'--tag={tag}'] if tag else []), f'--depth={depth}', f'"{import_path}"', ] if import_path else ['update']),