"""Build the CNX Vinyl business plan .docx. python build_plan.py -> ../CNX-Vinyl-Business-Plan.docx python build_plan.py out.docx -> custom path Images are resolved relative to docs/ (the parent of business-plan/). """ from __future__ import annotations import sys from pathlib import Path HERE = Path(__file__).resolve().parent sys.path.insert(0, str(HERE)) from plan_lib import Renderer # noqa: E402 import content_a, content_b, content_c # noqa: E402 DOCS = HERE.parent.parent # .../docs OUT = HERE.parent / "CNX-Vinyl-Business-Plan.docx" def main(out: Path = OUT) -> Path: r = Renderer(DOCS, header_text="CNX Vinyl / Poy Records: Business plan, draft 0.2, October 2026", footer_text="Confidential") r.render(content_a.blocks() + content_b.blocks() + content_c.blocks()) r.save(out) return out if __name__ == "__main__": target = Path(sys.argv[1]) if len(sys.argv) > 1 else OUT print(main(target))