Credibility pass over the Green Man generator
Turn audit.py into a run() function and drop audit_run.py, which only existed to import it quietly. Remove unused parameters, keys, helpers and imports from draw.py, manifest.py and stl_build.py, and the source file names in stl_build.FILES that pointed at nothing. Keep the brow strip's taper and knob positions in geom.py only. Correct comments and docstrings that disagreed with the code, and the README's claim about counts. The page changes only in markup: no stray spaces in class attributes, and three CSS declarations that did nothing are gone. Guide HTML, templates and print files are byte-identical apart from that. Credibility pass over a7c04e5..HEAD; the next one can scope from here. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
b86153a9fd
commit
f2bb87caeb
15 files changed
+148
-151
No files matched your search
@@ -1,5 +1,5 @@
|
||||
"""Build the two guide PDFs (US Letter portrait) from content.py."""
|
||||
import asyncio, os, shutil
|
||||
import asyncio, shutil
|
||||
import content as C, shot, fonts
|
||||
from paths import OUT, ASSETS
|
||||
|
||||
@@ -48,8 +48,8 @@ table.dense { font-size: 7.3pt; } table.dense td, table.dense th { padding-right
|
||||
.leafstrip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5mm; } .leafstrip figcaption { text-align: center; }
|
||||
'''
|
||||
|
||||
def link_images():
|
||||
"""The guides load photos from img/ beside the HTML, so mirror the assets there."""
|
||||
def copy_images():
|
||||
"""The guides load photos from img/ beside the HTML, so copy the assets there."""
|
||||
dst = OUT / 'img'
|
||||
if dst.exists(): shutil.rmtree(dst)
|
||||
shutil.copytree(ASSETS / 'img', dst)
|
||||
@@ -58,7 +58,7 @@ def build(kind):
|
||||
body = C.construction() if kind == 'build' else C.painting()
|
||||
title = 'Green Man mask · build guide' if kind == 'build' else 'Green Man mask · painting guide'
|
||||
html = f'<!doctype html><html lang="en"><head><meta charset="utf-8"><title>{title}</title><style>{fonts.CSS}{CSS}</style></head><body>{body}</body></html>'
|
||||
link_images(); src = str(OUT / f'_{kind}.html'); open(src, 'w').write(html)
|
||||
copy_images(); src = str(OUT / f'_{kind}.html'); open(src, 'w').write(html)
|
||||
out = str(OUT / f'GreenMan_{"build" if kind == "build" else "painting"}_guide.pdf')
|
||||
asyncio.run(shot.go(src, out, footer=title)); return out
|
||||
|
||||
|
||||
Reference in new issue
Block a user