MCPcopy Index your code
hub / github.com/idank/explainshell / cmd_download

Function cmd_download

tools/fetch_manned.py:114–129  ·  view source on GitHub ↗

Download all dump files from manned.org.

(args)

Source from the content-addressed store, hash-verified

112
113
114def cmd_download(args):
115 """Download all dump files from manned.org."""
116 for cmd in ["curl", "zstd"]:
117 if subprocess.run(["which", cmd], capture_output=True).returncode != 0:
118 logger.error("Required command '%s' not found. Please install it.", cmd)
119 sys.exit(1)
120
121 dump_url = args.dump_url or resolve_dump_url(DEFAULT_DUMP_BASE)
122 data_dir = args.data_dir
123 os.makedirs(data_dir, exist_ok=True)
124
125 for fname in ALL_FILES:
126 dest = os.path.join(data_dir, fname)
127 download_file(f"{dump_url}/{fname}", dest)
128
129 logger.info("=== Download complete. Files saved to %s ===", data_dir)
130
131
132def cmd_extract(args):

Callers 1

mainFunction · 0.85

Calls 2

resolve_dump_urlFunction · 0.85
download_fileFunction · 0.85

Tested by

no test coverage detected