from __future__ import annotations import sys from pathlib import Path REPO_ROOT = Path(__file__).resolve().parents[1] SPACE_TEMPLATE_PATH = REPO_ROOT / "docs" / "deployment" / "SPACE_README_TEMPLATE.md" def main() -> None: if len(sys.argv) != 2: raise SystemExit("Usage: python scripts/prepare_space_readme.py ") output_path = Path(sys.argv[1]).expanduser() template = SPACE_TEMPLATE_PATH.read_text(encoding="utf-8") output_path.parent.mkdir(parents=True, exist_ok=True) output_path.write_text(template, encoding="utf-8") if __name__ == "__main__": main()