MCPcopy
hub / github.com/ArchiveBox/ArchiveBox / main

Function main

archivebox/cli/archivebox_schedule.py:18–112  ·  view source on GitHub ↗
(args: Optional[List[str]]=None, stdin: Optional[IO]=None, pwd: Optional[str]=None)

Source from the content-addressed store, hash-verified

16
17@docstring(schedule.__doc__)
18def main(args: Optional[List[str]]=None, stdin: Optional[IO]=None, pwd: Optional[str]=None) -> None:
19 parser = argparse.ArgumentParser(
20 prog=__command__,
21 description=schedule.__doc__,
22 add_help=True,
23 formatter_class=SmartFormatter,
24 )
25 parser.add_argument(
26 '--quiet', '-q',
27 action='store_true',
28 help=("Don't warn about storage space."),
29 )
30 group = parser.add_mutually_exclusive_group()
31 group.add_argument(
32 '--add', # '-a',
33 action='store_true',
34 help='Add a new scheduled ArchiveBox update job to cron',
35 )
36 parser.add_argument(
37 '--every', # '-e',
38 type=str,
39 default=None,
40 help='Run ArchiveBox once every [timeperiod] (hour/day/month/year or cron format e.g. "0 0 * * *")',
41 )
42 parser.add_argument(
43 '--tag', '-t',
44 type=str,
45 default='',
46 help="Tag the added URLs with the provided tags e.g. --tag=tag1,tag2,tag3",
47 )
48 parser.add_argument(
49 '--depth', # '-d',
50 type=int,
51 choices=[0, 1],
52 default=0,
53 help='Depth to archive to [0] or 1, see "add" command help for more info',
54 )
55 parser.add_argument(
56 '--overwrite',
57 action='store_true',
58 help='Re-archive any URLs that have been previously archived, overwriting existing Snapshots',
59 )
60 parser.add_argument(
61 '--update',
62 action='store_true',
63 help='Re-pull any URLs that have been previously added, as needed to fill missing ArchiveResults',
64 )
65 group.add_argument(
66 '--clear', # '-c'
67 action='store_true',
68 help=("Stop all ArchiveBox scheduled runs (remove cron jobs)"),
69 )
70 group.add_argument(
71 '--show', # '-s'
72 action='store_true',
73 help=("Print a list of currently active ArchiveBox cron jobs"),
74 )
75 group.add_argument(

Callers 1

Calls 2

reject_stdinFunction · 0.85
scheduleFunction · 0.85

Tested by

no test coverage detected