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,6 +1,6 @@
|
||||
"""Web page version of both guides, plus downloads, as it is published on the builds site.
|
||||
Photos, PDFs and the zips sit beside the page in img/ and dl/."""
|
||||
import re, importlib
|
||||
import re
|
||||
import content as C
|
||||
from paths import OUT
|
||||
|
||||
@@ -62,24 +62,22 @@ table.dense { font-size: 0.8rem; min-width: 760px; }
|
||||
.stl-grid figure { background: var(--paper); border-radius: 6px; padding: 4px 4px 8px; } .stl-grid figcaption { text-align: center; color: var(--paper-fg); margin: 0; font-size: 0.72rem; }
|
||||
.leafstrip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; } .leafstrip figcaption { text-align: center; }
|
||||
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 10px; }
|
||||
.dl .dlbtn { text-decoration: none; text-align: left; font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; cursor: pointer; display: grid; gap: 4px; }
|
||||
.dl .dlbtn { text-decoration: none; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; display: grid; gap: 4px; }
|
||||
.dl .dlbtn:hover, .dl .dlbtn:focus-visible { border-color: var(--accent); outline: none; text-decoration: none; } .dl .dlbtn:hover b, .dl .dlbtn:focus-visible b { color: var(--accent); }
|
||||
.dl .dlbtn b { font-family: var(--display); font-size: 1.2rem; font-weight: 500; } .dl .dlbtn span { font-size: 0.82rem; color: var(--muted); }
|
||||
.home { margin: 0 0 24px; font-size: 0.95rem; } .home a { text-decoration: none; } .home a:hover, .home a:focus-visible { text-decoration: underline; }
|
||||
.home.foot { margin: 48px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
|
||||
@media (max-width: 760px) { .cover, .cols, .step, .stage { grid-template-columns: minmax(0, 1fr); } .cover-photo { max-width: 360px; } .leafstrip { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
|
||||
@media (max-width: 760px) { .cover, .cols, .step, .stage { grid-template-columns: minmax(0, 1fr); } .cover-photo { max-width: 360px; } }
|
||||
'''
|
||||
|
||||
def wrap_tables(h): return h.replace('<table', '<div class="tw"><table').replace('</table>', '</table></div>')
|
||||
|
||||
def build(out=str(OUT / 'index.html')):
|
||||
importlib.reload(C)
|
||||
build_html = C.construction(); paint_html = C.painting().replace('<header class="cover">', '<header class="cover guide-start" id="painting">').replace('<h1>Green Man mask</h1>', '<h1>Painting the mask</h1>')
|
||||
body = C.construction(); paint_html = C.painting().replace('<header class="cover">', '<header class="cover guide-start" id="painting">').replace('<h1>Green Man mask</h1>', '<h1>Painting the mask</h1>')
|
||||
dls = [('GreenMan_mask_kit.zip', 'Whole kit', 'Templates, both guides, and the 8 print files in one zip'), ('GreenMan_templates.pdf', 'Templates', '4 pages, 1:1, US Letter or A4'),
|
||||
('GreenMan_build_guide.pdf', 'Build guide', 'Printable, for the workbench'), ('GreenMan_painting_guide.pdf', 'Painting guide', 'Printable'), ('GreenMan_print_files.zip', 'Print files', '8 STL files, no supports needed')]
|
||||
downloads = ('<section id="downloads"><h2>Downloads</h2><div class="dl">' + ''.join(f'<a class="dlbtn" href="dl/{f}" download><b>{t}</b><span>{d}</span></a>' for f, t, d in dls) + '</div></section>')
|
||||
nav = '<nav class="top" aria-label="Sections"><a href="#downloads">Downloads</a><a href="#build">Build guide</a><a href="#step-strip">Assembly steps</a><a href="#painting">Painting guide</a></nav>'
|
||||
body = build_html
|
||||
i = body.index('</header>') + len('</header>')
|
||||
body = body[:i] + nav + downloads + '<div id="build"></div>' + body[i:]
|
||||
home = '<p class="home"><a href="../">\u2190 Kestrel\u2019s Builds</a></p>'
|
||||
|
||||
Reference in new issue
Block a user