Skip to content

RFC tooling: pandoc reference template + generator - #3

Open
calizarr wants to merge 1 commit into
masterfrom
rfc-pandoc-template
Open

RFC tooling: pandoc reference template + generator#3
calizarr wants to merge 1 commit into
masterfrom
rfc-pandoc-template

Conversation

@calizarr

Copy link
Copy Markdown
Owner

What

Adds RFC → Google Docs conversion tooling under Documents/RFC/:

  • build-rfc-reference.py — self-contained generator (Python stdlib + pandoc) that builds the reference doc.
  • rfc-reference.docx — the pandoc --reference-doc template it produces.

Why

RFCs live in Google Docs. Authoring in Markdown and converting to .docx gives a clean Docs import, and a shared reference template keeps every RFC's styling consistent.

Template styling

  • Arial body (11pt); Arial headings — bold, deep blue, default size hierarchy preserved (so the Docs outline panel works)
  • Left-aligned title
  • Courier New for inline and block code — a font Google Docs is guaranteed to have, so ASCII diagrams stay monospaced/aligned after import
  • A shaded Source Code block style; tables with thin borders and a bold, shaded header row

Usage

# regenerate the template
python3 Documents/RFC/build-rfc-reference.py

# convert an RFC
pandoc your-rfc.md -f gfm --reference-doc=Documents/RFC/rfc-reference.docx -o your-rfc.docx

Testing

  • Generator runs from a clean checkout and produces a valid .docx (styles.xml re-parses; Title left-aligned; Source Code style present).
  • Converting a real RFC applies SourceCode to code blocks and VerbatimChar (Courier New) to inline code; output round-trips back to identical Markdown via pandoc -t gfm.

🤖 Generated with Claude Code

Add a reusable pandoc --reference-doc template (rfc-reference.docx) and the
self-contained script that generates it (build-rfc-reference.py), for turning
RFC Markdown into Google-Docs-friendly .docx.

Template: Arial body/headings (bold, deep blue), left-aligned title, Courier
New for inline and block code (keeps ASCII diagrams monospaced/aligned after a
Google Docs import), a shaded Source Code style, and bordered tables with a
bold, shaded header row.

Regenerate:  python3 Documents/RFC/build-rfc-reference.py
Convert RFC: pandoc your-rfc.md -f gfm --reference-doc=rfc-reference.docx -o your-rfc.docx

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant