Files
builds/greenman-src
Eric WagonerandClaude Fable 5.2 7c43dbd6e2 Count Green Man downloads as GoatCounter events
Each download button records a click as an event named after the
file's full path, so downloads sort beside the page in the dashboard.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 19:53:59 -05:00
..

Green Man mask: kit source

Everything published in ../greenman/ is generated from this folder. Edit here and rebuild; do not edit ../greenman/ by hand, because the next build replaces it.

This folder is not part of the website. ../deploy skips every folder whose name ends in -src.

Build

uv run build.py                 # build, then copy the result into ../greenman
uv run build.py --no-publish    # build into out/ only, to look before publishing

uv reads the dependency list at the top of build.py and sets up its own environment. The PDFs are rendered with Chromium through Playwright. If Playwright has no browser of its own it uses Google Chrome; to give it one, run uv run --with playwright playwright install chromium once.

A build takes about ten seconds. It stops with an error if a print file fails the printability check or if the audit finds a step that disagrees with the parts layout.

After a build, review git diff in ../greenman, then run ../deploy from the site root.

What a build does, in order

  1. stl_build.py writes the eight print files into out/stl and tests each one: watertight, flat on the bed, no layer starting in mid-air. The three files in stl_src that failed on the printer are run through the same test as a control and must fail it.
  2. audit.py runs the manifest's own layout checks (manifest.validate()), then walks the assembly in step order and checks each step's text against where the parts actually sit.
  3. build_templates.py makes the 1:1 cutting templates (4 pages).
  4. build_guides.py makes the build guide and the painting guide as PDFs.
  5. build_web.py makes the web page, with its head, share tags and the links back to the site index.
  6. build.py zips the downloads and copies the page, img/, dl/ and og-image.jpg into ../greenman.

Where to change things

To change Edit
Parts, quantities, step order, what is glued where manifest.py
Shapes and dimensions of the base, leaves and strip geom.py
Wording of either guide content.py
Step drawings draw.py
Template page layout build_templates.py
Web page styling, title, description, share tags build_web.py
PDF styling build_guides.py
How HTML is rendered to PDF shot.py
Generated print files (brow strip, acorns) stl_build.py
README inside the kit zip assets/kit_README.txt

manifest.py is the single source for parts and steps. The templates, both guides, the web page and the print set all take their tables, counts and step order from it. Some sentences spell a number out by hand (in content.py, the template notes in build_templates.py, the download blurbs in build_web.py and assets/kit_README.txt), so reread those after changing a count.

Inputs kept here

  • stl_src/ holds the hand-modelled print files (bark knot, twig, tendril, vein stamp) and the three control files.
  • assets/img/ holds the photos and the part renders shown in the guides. The part renders are pictures, not generated by the build, so re-render any whose print file changes.
  • assets/og-image.jpg is the share image for the page.
  • assets/fonts/ holds the fonts for the PDFs, so they come out the same on any machine.

out/ and work/ are build products and are not committed.