libs/myform
myForm
Universal Docs-Format Translator
myform is a universal docs-format translator built around one absolute, typed document tree that reads MyST and GFM and writes MyST, GFM, reStructuredText, and Typst.
Preview not recorded.
What it shows
What it is and what it demonstrates.
myForm is a universal document-format translator built around one absolute, typed document tree that reads MyST and GFM and writes MyST, GFM, reStructuredText, and Typst. It is the format bridge that lets the fleet author in one markup and publish to every surface the ecosystem needs.
The problem
The fleet's documentation and publishing pipeline spans MyST (for Sphinx), GFM (for GitHub and the web), reStructuredText (for legacy Python docs), and Typst (for print-quality PDFs). Each format has its own syntax, block model, and extension conventions, so maintaining content in multiple markups meant constant manual translation, format-specific drift, and duplicated effort. There was no single translator that could round-trip through a common tree without losing structural fidelity.
The approach
myForm parses MyST and GFM into one canonical, typed document tree — paragraphs, headings, lists, code blocks, admonitions, cross-references — then serializes that tree to any supported output format. The tree is the single source of truth; format-specific quirks live in the reader and writer surfaces, not in the content. The 42-test suite and 25-page documentation set cover the translation matrix, and CI and pre-commit hooks gate every change.
What it demonstrates
Maintaining a four-format translator with 42 tests, 25 documentation pages, full type annotations, CI, and pre-commit hooks shows the same care for a utility that touches every document in the fleet — a mistranslation in one writer silently corrupts downstream output, so the contract has to hold across the full format matrix.
Repository evidence
Observable facts.
- Documentation
- 25 documentation files
- Test surface
- 42 test files
- Continuous integration
- Configured
- Pre-commit hooks
- Configured
- Typed source
- Configured
- Visual evidence
- Preview stub
- Technologies
- lib · py · pypi · myst · typst