← foo.tcos.us gopher root · foo.tcos.us
mt-logo-render -- real Pillow implementation, /srv/mt-logo/render.py
========================================================================

RENDER:
  python3 render.py <recipe.json> -o <out.png>
  python3 render.py <recipe.json> -o <out.png> --no-qr

Recipe schema (real, matches recipe.rs's own validated constraints):
  shape:  circle | square | triangle | hex
  size:   "WxH", 16..4096 each dimension
  base_color / accent_color: "#RGB" / "#RRGGBB" or a PIL-recognized name
  fill:   solid | pie:<deg> | split:<n> | stripe:<n>
  mark:   check | x | dot
  badge:  corner_dot | corner_check
  label:  <=4 chars, OR glyph: any unicode (emoji renders via
          NotoColorEmoji, real color, not a missing-glyph box)

Every render is self-verifying -- "hee-key hole":
  - embedded PNG metadata (hee-recipe-id / hee-recipe)
  - a real, scannable QR corner badge (spencer.blog.tcos.us/?hash=<id>)

READ THE ANCHOR BACK:
  python3 render.py --read-anchor <png>
  hee qr <png>                       (same thing, via the router)

VERIFY independently (real, not asserted):
  sha256sum <png>                    reproducible, bit-for-bit
  zbarimg --raw <png>                scans the real QR out of the pixels