INNER CODE UNIT · Python

write_text

epigen/MrBiomics · helpers/MrBiomics_context_crawler.py:302

def write_text(path: Path, content: str, dry_run: bool) -> None:
  if dry_run:
      print(f"[dry-run] Would write {path} ({len(content)} characters)")
      return
  path.write_text(content, encoding="utf-8")
  print(f"Wrote {path} ({len(content)} characters)")


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)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…