Add the Green Man generator and restyle its page to match the index

greenman-src/ holds the kit source; uv run build.py there rewrites
greenman/. deploy skips *-src/. The page now uses the index's ink,
bone and gold with the same serif, and no longer loads web fonts.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GrX9qMoNihcWLX3xoJhabw
This commit is contained in:
Eric WagonerandClaude Fable 5.2 committed 2026-11-10 18:29:29 -05:00
1 parent a7c04e5cb7
commit 9c3c361858
59 files changed
+1640 -41

No files matched your search

+52
View File
@@ -0,0 +1,52 @@
# 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
```bash
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` 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` |
| 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 read from it, so a count changed there changes everywhere.
## 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.