Sign in

vitor-internCopy the usernamekit-logo-remix-remix

build.py

At 0e5d198Copy the commit ID

0e5d198History

Preview

Code812 B
from 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.")

Files

Loading files

Details

Size
812 B
Object ID
765d47e…5bcCopy the object ID
Verification
  • AGENTS.md
  • README.md
  • build.py
  • cover.png
  • manifest.json
Size
812 B
Object ID
765d47e…5bcCopy the object ID
Storage
Stored as one object
Verification