Markdown файл рендерится в PDF с оформлением под выбранный BrandBook
Go to file
Ilgiz Kalmetyev a78154c54c пакет переименован из docgen в md2brandtk 2026-03-24 19:06:40 +05:00
brandbooks/default test3.html свёрстан. 2026-03-09 21:59:17 +05:00
data test3.html свёрстан. 2026-03-09 21:59:17 +05:00
docs docs: describe md metadata css vars and brandbook contract 2026-03-07 18:42:18 +05:00
plan пакет переименован из docgen в md2brandtk 2026-03-24 19:06:40 +05:00
scripts пакет переименован из docgen в md2brandtk 2026-03-24 19:06:40 +05:00
src/md2brandtk пакет переименован из docgen в md2brandtk 2026-03-24 19:06:40 +05:00
tests пакет переименован из docgen в md2brandtk 2026-03-24 19:06:40 +05:00
.gitignore chore(repo): add gitignore for build and temp artifacts 2026-03-07 17:32:44 +05:00
README.md пакет переименован из docgen в md2brandtk 2026-03-24 19:06:40 +05:00
pytest.ini test(smoke): add e2e checks for multi-part document generation 2026-03-07 18:41:33 +05:00
requirements.txt chore(deps): add python dependencies for rendering pipeline 2026-03-07 17:34:04 +05:00
test1.html указания значений колонтитулов сделаны через переменные. добавлен текст на три страницы 2026-03-07 15:41:34 +05:00
test2.html test3.html свёрстан. 2026-03-09 21:59:17 +05:00
test3.html test3.html - добавлены логотипы в колонтитулы 2026-03-10 18:23:35 +05:00
test3.pdf test3.html - добавлены логотипы в колонтитулы 2026-03-10 18:23:35 +05:00

README.md

md2brandtk

CLI renders a multi-part document from Markdown front matter and a brandbook contract.

Usage

python scripts/render_document.py --input data/sample.md --brandbook default --output output/pdf/sample.pdf

Options:

  • --tmp-dir: temporary folder for intermediate PDFs (default: tmp/pdfs)
  • --strict: fail on unknown Jinja placeholders
  • MD2BRANDTK_FAKE_RENDER=1: render blank placeholder PDFs instead of invoking WeasyPrint

Input and contracts

  • Markdown contract: docs/md-contract.md
  • Brandbook contract: docs/brandbook-contract.md

Tests

python -m pytest -q tests/unit
python -m pytest -q -m smoke