import runpy, sys from pathlib import Path here = Path(__file__).resolve().parent build = here.parent / "_tools" / "build_guide.py" for md in [here / "design-card.md"] + sorted((here / "examples").glob("*.md")): sys.argv = ["build_guide.py", str(md)] runpy.run_path(str(build), run_name="__main__")