← All repos

pandocfilters

A python module for writing pandoc filters, with a collection of examples

Browse cluster: Haskell tooling and libraries
212commits
45contributors
1languages

Tech stack & purpose

pandocfilters is a Python module for writing filters that process Pandoc documents. Pandoc filters are programs that read Pandoc's JSON Abstract Syntax Tree representation from stdin, transform it, and write the result back to stdout, enabling users to extend Pandoc's document conversion capabilities. The module provides core functions like `walk()` for tree traversal, `toJSONFilter()` for creating filters from action functions, and `stringify()` for extracting text content, along with a collection of example filters demonstrating uses such as converting text to uppercase, processing code blocks into images (via GraphViz, Lilypond, PlantUML, and other tools), handling comments, and custom emphasis rendering. The project is compatible with multiple Pandoc versions (1.12 through current releases) and can be installed via pip or setup.py.

Languages

Python
100.0%

Contributors (top 30 of 45)