Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# (c) Stefan Countryman, 2019
3"""
4Run post-installation routines. Downloads and installs large library data files
5from remote directories.
6"""
8from llama.cli import get_logging_cli, CliParser
9from llama.install import DESTINATIONS, install_manifest
12def get_parser():
13 """Get CLI Parser."""
14 parser = CliParser(description=__doc__,
15 parents=(get_logging_cli('/dev/null', 'info'),))
16 parser.add_argument("-d", "--download", choices=list(DESTINATIONS),
17 help="""
18 Download and install data from specified destinations. These files are
19 data files that are necessary for the pipeline to function.""")
20 # parser.add_argument("-p", "--prune", action="store_true", help="""
21 # If specified, delete and files in the destination directory that are
22 # not specified in the manifest. Use this to delete deprecated files that
23 # or any cruft that's lying around.""")
24 return parser
27def main():
28 """Run CLI."""
29 parser = get_parser()
30 args = parser.parse_args()
31 if args.download is not None:
32 root, manifest = DESTINATIONS[args.download]
33 install_manifest(root, manifest)