feat(docs): ODF reference docs, and a lint that reads documents #121
No reviewers
Labels
No labels
priority
P1
priority
P2
priority
P3
priority
P4
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Toilville/toilville-design!121
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/udg-odf-document-product"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Makes the native document pipeline UDG-aware: proposals and SOWs now build on-brand from tokens instead of from stock pandoc or a one-off design tool.
Scope
udg/generators/docs.py— ODF writer:reference.odt(pandoc--reference-doc),template.ott,proposal.odtfor every product. Fixes_type_scale, which read a non-existenttypetier and returned{}.tools/doc_build.py+just doc <src.md>— markdown → branded ODT; YAML front matter (title,short-title,doc-number,classification,date,org) fills the running header/footer; images clamped to the page measure.udg/generators/align_check.py+just doc-lint <path>— font audit beside the hex audit,scan/scan-strictfor documents that live outside the repo,UDG:BEGIN/ENDgenerated-block skip, and the fragment-reference false positive in_HEXfixed. Deliberately not added tojust check— see Impact.dist/— regenerated: 39 new ODF files; DOCX/DOTX/PDF/SVG changed by the_type_scalefix.Testing
origin/main(0336756); resolvedalign_check.pyagainst1a532e5, keeping its worktree-safe sibling lookup, its "NOT AUDITED" wording and its native-must-run gate.docs.py build --allon the new base changes 0dist/files.just checkexit 0;pytestall pass (incl.test_word_builder).docs.py build --allrun twice → byte-identical ODF;docs.py check --allpasses.soffice --headless --convert-to pdfacceptsreference.odtandproposal.odt— the real test of ODF packaging.--reference-doc:styles.xmlgoes from Arial/Courier, a relative H1 and no header → Sora/DM Mono, a token-derived H1 and a running header. A reference doc that is silently ignored would otherwise look like success.doc_build.pyleavesdist/byte-identical (hashed before and after).doc-linton the original sales HTML: 120 findings, exit 1. On the re-tokened pages: 0, exit 0._HEXcases:url(#add),href="#fade",xlink:href='#bead'are not matched; real colour literals still are.Impact Statement
_type_scalefix.just checkmembership is unchanged.1a532e5madealign_check.py checkfail when noToilville_Ritualssibling is checked out, and CI's checkout has none (onlyudg-copy-coverageandudg-native-syncclone it). Wiring it intojust checkwould fail any clone without the sibling for reasons unrelated to its change. Documents gate throughjust doc-lint, which needs no sibling.20260910_1700) adds the matching design-canon rules and widens the guidance query that could only seeapps-rituals.The document pipeline could hash a generated file but never look inside one, and it had no ODF output — so a proposal built with bare pandoc shipped in Times and Arial with no running header. docs.py - ODF writer: reference.odt (pandoc --reference-doc), template.ott and proposal.odt for every product. mimetype is written first and STORED; _zip_package sorts and deflates every member, which LibreOffice rejects. - Styles carry the names pandoc looks up (Heading_20_1, Text_20_body …); any other name is silently ignored and the output stays unstyled. - Print type ramp: body at its token size, only the distance above it compressed (0.55), so h1 is ~2x body on paper rather than 3x. - Fix: _type_scale read a tier named "type"; it is "typography". It returned {}, so every DOCX heading rendered at body size and the token sheets had no type scale. That is most of the dist/ churn here. tools/doc_build.py (just doc) - Stamps header/footer from YAML front matter onto a throwaway copy of reference.odt, so dist/ stays byte-deterministic for the drift gate. - Clamps images to the page measure: pandoc writes pixel counts as points (932px becomes 12.9in on a 6.5in measure). align_check.py (just doc-lint <path>) - Font audit beside the hex audit; scan / scan-strict for documents that live outside the repo; UDG:BEGIN/END generated blocks skipped. - _HEX no longer matches url(#id) or href="#id" fragment references. - Rebased onto1a532e5, which made `check` fail when the Toilville_Rituals sibling is absent. CI's checkout has no sibling, so align_check stays out of `just check`; documents gate through scan-strict, which needs none. The font audit reports the 5 pre-existing Inter/Arial declarations in atahualpa-tctd without failing on them.