INNER CODE UNIT · Python
parse_args
epigen/MrBiomics · helpers/MrBiomics_context_crawler.py:310
def parse_args(argv: Optional[Sequence[str]] = None) -> argparse.Namespace:
parser = argparse.ArgumentParser(description="Collect LLM-ready MrBiomics resources via GitIngest.")
parser.add_argument("--output-root", type=Path, default=Path.cwd(), help="Directory where the resources folder will be created.")
parser.add_argument("--token", type=str, default=None, help="GitHub token for higher rate limits when calling the GitHub API and GitIngest.")
parser.add_argument("--skip-main", action="store_true", help="Skip the main MrBiomics repository snapshot.")
parser.add_argument("--skip-modules", action="store_true", help="Skip the module repositories snapshot.")
parser.add_argument("--skip-wiki", action="store_true", help="Skip the MrBiomics wiki snapshot.")
parser.add_argument("--dry-run", action="store_true", help="Print the planned actions without writing files.")
return parser.parse_args(argv)
def main(argv: Optional[Sequence[str]] = None) -> int:
if ingest is None:
raise SystemExit("GitIngest is required; install it with `pip install gitingest` before running this script.")
args = parse_args(argv)
generated_at = dt.datetime.now(dt.timezone.utc)
output_root = args.output_root.resolve()
output_dir = prepare_output_dir(output_root, args.dry_run)