build.py
At 13c4e62Copy the commit ID
Preview
Code1 KiBfrom pathlib import Path
import shutil
import subprocess
from source.logo import render
root = Path(__file__).resolve().parent
art = root / "art"
art.mkdir(exist_ok=True)
previews = root / "previews"
previews.mkdir(exist_ok=True)
renderer = shutil.which("rsvg-convert")
for name, grid in [("logo-grid", True), ("logo-clean", False)]:
svg = art / (name + ".svg")
svg.write_text(render(grid=grid))
if renderer:
subprocess.run([renderer, "-w", "1000", "-h", "1000", "-o", str(previews / (name + ".png")), str(svg)], check=True)
if renderer is None:
raise SystemExit("SVGs are in art/. Install librsvg, then run build.py again to render PNGs.")
shutil.copy2(previews / "logo-grid.png", root / "cover.png")
print("Built grid and clean logos as SVG and PNG, with the grid logo as cover.png.")
from source.variations import build as build_variations
build_variations(root)
from source.shapes import build as build_shapes
build_shapes(root)
from source.solid_library import build as build_solids
build_solids(root)
Files
Loading files