From 21b87b860d6d88f53aac5636a41097b3a60d9a12 Mon Sep 17 00:00:00 2001 From: Vytautas Liuolia Date: Wed, 18 Sep 2024 18:56:46 +0200 Subject: [PATCH] Add a hacky (but easy) way to quickly render some visual output. --- examples-dark/.gitkeep | 1 + examples-light/.gitkeep | 1 + tox.ini | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100644 examples-dark/.gitkeep create mode 100644 examples-light/.gitkeep diff --git a/examples-dark/.gitkeep b/examples-dark/.gitkeep new file mode 100644 index 0000000..d4db507 --- /dev/null +++ b/examples-dark/.gitkeep @@ -0,0 +1 @@ +This directory is preserved for the output from rendering examples. diff --git a/examples-light/.gitkeep b/examples-light/.gitkeep new file mode 100644 index 0000000..d4db507 --- /dev/null +++ b/examples-light/.gitkeep @@ -0,0 +1 @@ +This directory is preserved for the output from rendering examples. diff --git a/tox.ini b/tox.ini index 5a37743..f711261 100644 --- a/tox.ini +++ b/tox.ini @@ -15,3 +15,11 @@ skip_install = True commands = ruff check ruff format --check + +[testenv:render-examples] +deps = + Pillow +commands = + # TODO(vytas): Make font name (auto-) configurable, not hardcoded. + pygmentize example-code/document.md -O 'font_name=SourceCodePro-Medium,font_size=24,style=falconry-dark' -o examples-dark/document.png + pygmentize example-code/document.md -O 'font_name=SourceCodePro-Medium,font_size=24,style=falconry-light' -o examples-light/document.png