pots-shutdown-tracker / scripts /prepare_space_readme.py
github-actions
Deploy e9638c4ddc3ed29a18779b38f43922aa3139b311
611bfd9
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>")
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()