Skip to main content

markdown-gost

Markdown to GOST 7.32 DOCX/PDF converter with a paginated HTML preview.

  • Syntax reference — extended Markdown: tables, listings, equations, appendices, bibliography, templates
  • Architecture — pipeline, config system, storage protocol, testing tiers

Install

pipx install markdown-gost            # DOCX + preview
pipx install "markdown-gost[pdf]"     # + unoserver tooling

PDF output requires a running unoserver (pipx install unoserver && unoserver &), reachable via UNOSERVER_HOST / UNOSERVER_PORT (default 127.0.0.1:2003). Import requires pandoc >= 2.19 in PATH (PANDOC_BINARY to override). Fonts for accurate pagination:

  • Linux: apt install fontconfig fonts-liberation fonts-dejavu
  • macOS: brew install fontconfig font-liberation
  • Windows: resolved from the Windows font registry — no fontconfig needed; for PDF output use WSL or the Docker image

MARKDOWN_GOST_FONT_BACKEND=auto|fc-list|windows overrides font discovery (auto = fc-list if present, else the Windows registry).

Docker image with LibreOffice, unoserver, pandoc and fonts included:

docker run --rm -v "$PWD":/work -w /work ghcr.io/grenition/markdown-gost:1.1.0 \
  convert paper.md -o paper.docx

Agent skill

npx skills add grenition/markdown-gost          # skills.sh registry: Claude Code, Cursor, Codex, opencode, ...
cp -r skills/markdown-gost ~/.claude/skills/    # or copy into your harness skills directory

Commands

markdown-gost convert input.md -o out.docx
markdown-gost convert input.md -o out.pdf                 # needs unoserver
markdown-gost convert input.md -o out.docx --config my.yaml
markdown-gost convert input.md -o out.docx --config gost-7-32-2017
markdown-gost validate input.md
markdown-gost import legacy.docx -o imported.md           # needs pandoc
markdown-gost import legacy.pdf -o imported.md            # needs pandoc + unoserver

Config: --config accepts a YAML file or a built-in preset name (gost-7-32-2017); inside a YAML file the preset is chosen via preset: gost-7-32-2017, any field overridable. Full schema: markdown_gost.config.schema.Config.model_json_schema().

Preview API:

from markdown_gost.preview import build_preview_model, render_preview_html

document = build_preview_model(markdown_text, config)
html = render_preview_html(document)

Object stores are not bundled: implement the Storage protocol and pass your implementation to the conversion APIs.

Development

Python 3.13, Poetry 2.x.

poetry install
make test-unit
make test-integration
make test-screenshot      # pixel-diff merge gate
make lint typecheck
make test-in-docker       # full suite in the test image

License

MIT — see LICENSE.

Metadata

Release files for markdown-gost 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for markdown-gost 1.1.1
File Size Uploaded Provenance Actions
markdown_gost-1.1.1.tar.gz 212.7 kB With provenance Details for markdown_gost-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for markdown-gost 1.1.1
File Interpreter ABI Platform Actions
markdown_gost-1.1.1-py3-none-any.whl Python 3 none any Details for markdown_gost-1.1.1-py3-none-any.whl

Total release size: 470.0 kB

Release files / markdown_gost-1.1.1.tar.gz

Download URL markdown_gost-1.1.1.tar.gz
Size 212.7 kB
Tags Source
SHA-256 checksum
How to use checksums
54cbc88ebb303265ebaddc033439aa2a52cf9b3d5f8b99cf4feb6752927f450f
BLAKE2b-256 checksum
How to use checksums
9016d63eba2b63aefbe3615800f6b7c139589d1df6f2cb9494578e922d1a8f75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

Release files / markdown_gost-1.1.1-py3-none-any.whl

Download URL markdown_gost-1.1.1-py3-none-any.whl
Size 257.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1facbe87310e4b17e6654ad5d31d24d7ab0a7cb1f7ef1142a5ed45630726142b
BLAKE2b-256 checksum
How to use checksums
7518b099bb599c83cbcf8d1119147b1d599072e2e16df91f1439f835d0a2e027
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

Security for markdown-gost 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for markdown_gost-1.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page