chore(draft): setup github action for generating editor's draft .html/ .docx#11
chore(draft): setup github action for generating editor's draft .html/ .docx#11awoie wants to merge 4 commits into
Conversation
|
(feedback from claude/codex, and '1' is missing as it wasn't helpful so I deleted it) 2. HTML draft numbers ISO front matter as clauses; DOCX does notFile:
Fix: Make the HTML rendition unnumber the front matter too (e.g. frontmatter 3. mmark-to-pandoc line filters are not fenced-code-block awareFile: The filters that drop Fix: Track fence state ( 4. Abstract-dropping swallows any lower-level headings after
|
- mmark-to-pandoc.py: parse TOML with tomllib, fence-aware filtering, abstract drop stops at any heading, title/status as separate fields (#3,4,6,7) - add golden-output test for the converter (tests/) - commit template/iso-reference.docx; drop generator from build path (#5) - make-iso-reference.py: drop word/embeddings/, strip dangling drawing refs (#8) - Makefile: clean before build, PYTHON override, pin markdown2rfc by digest (#9,13) - build.yml: pages concurrency group, pinned pandoc .deb, pin Python 3.12 (#10,11) - draft: unnumbered Foreword/Introduction so Scope=clause 1 in both outputs (#2); add seriesInfo stream (#9); relabel Working Group Draft -> Editor's Copy (#12)
Thanks for the detailed review. Addressed in the latest push (AI-assisted). Converter (parse, don't pattern-match).
Reference docx. Generated once and committed as Build/CI. finding 13 clean-before-build; finding 9 Findings 2 + 12. Foreword/Introduction are now unnumbered front matter ( Not going the Metanorma route: it would mean AsciiDoc and dropping the |
- seriesInfo stream independent conflicted with xml2rfc's default submissionType (IETF) and failed # Clean stale intermediates first so the copy below is unambiguous even if a # previous run was interrupted. rm -f draft/digital-credentials-harmonized-presentation*.html draft/digital-credentials-harmonized-presentation*.xml draft/digital-credentials-harmonized-presentation*.txt docker run --rm -v "/Users/oliver.terbu/git/openid/dchp/draft:/data" danielfett/markdown2rfc@sha256:7b4412559d6ba5db45a14174a28da5b240512e7c2a886a5e4adb44e5e67f34ca digital-credentials-harmonized-presentation.md Dockerfile danielfett/markdown2rfc Using versions: mmark: 2.2.31 xml2rfc 3.16.0 --------------------- mkdir -p build # Cleaned above, so this glob now matches exactly the fresh output whatever # markdown2rfc names it (it may add a draft-version suffix). cp draft/digital-credentials-harmonized-presentation*.html build/digital-credentials-harmonized-presentation-editors-copy.html rm -f draft/digital-credentials-harmonized-presentation*.html draft/digital-credentials-harmonized-presentation*.xml draft/digital-credentials-harmonized-presentation*.txt HTML Editor's Copy -> build/digital-credentials-harmonized-presentation-editors-copy.html; set stream = IETF to clear the empty-stream warning without the conflict (finding 9) - Makefile: auto-detect a tomllib-capable Python (3.11+) so mkdir -p build python3.13 tools/mmark-to-pandoc.py < draft/digital-credentials-harmonized-presentation.md > build/digital-credentials-harmonized-presentation.pandoc.md pandoc build/digital-credentials-harmonized-presentation.pandoc.md \ --reference-doc=template/iso-reference.docx \ --lua-filter=tools/iso-styles.lua \ -o build/digital-credentials-harmonized-presentation.docx rm -f build/digital-credentials-harmonized-presentation.pandoc.md ISO Word document -> build/digital-credentials-harmonized-presentation.docx works where the default python3 is older, with a clear error if none is found - Makefile: revert the HTML copy to a glob (markdown2rfc may add a draft-version suffix); the clean-before-build step keeps it unambiguous (finding 13)
Follow-up: fixed two build issues from the first pass (AI-assisted).
|
|
It seems there is a build error on github. I will fix and let you know once fixed @jogu . |
mmark hard-codes the rfc submissionType as IETF and won't accept a non-IETF stream, so the previous stream = IETF was misleading and stream = independent fails the build. Leave stream unset (benign Empty-stream warning, HTML still builds) and note that the real publication reference is a WG/SDO decision (issue 13).
|
Would it make sense to move the tooling to a separate repository in OIDF and provide it ready to use as a container? |
This PR does the following:
Fixes #12