Re:Cog: Use Python in your source files to generate pieces o...
by lvncelot on Thursday December 14, 2023 @04:17AM
(#38639414)
Oh wow that looks really neat. I'm using Pandoc a lot anyways, so this might fit nicely into my workload. Thanks for sharing!
[ Parent
| on HN ]
Re:Cog: Use Python in your source files to generate pieces o...
by shoeffner on Thursday December 14, 2023 @09:52AM
(#38641971)
Pandoc even poses codeblock execution as an exercise in their custom-filter documentation: https://pandoc.org/filters.html
The python package panflute is also really nice if you don't want to play around with haskell or the AST JSON directly.