--- id: pandocfilters version: "1.5.1" license: BSD-3-Clause license_treatment: permissive maintenance: aging --- # pandocfilters — Utilities for writing pandoc filters in python License: permissive · Maintenance: aging · Popularity: top 1,000 on PyPI ## Install pip install pandocfilters uv add pandocfilters poetry add pandocfilters ## Description pandocfilters ============= A python module for writing `pandoc `_ filters What are pandoc filters? -------------------------- Pandoc filters are pipes that read a JSON serialization of the Pandoc AST from stdin, transform it in some way, and write it to stdout. They can be used with pandoc (>= 1.12) either using pipes :: pandoc -t json -s | ./caps.py | pandoc -f json or using the ``--filter`` (or ``-F``) command-line option. :: pandoc --filter ./caps.py -s For more on pandoc filters, see the pandoc documentation under ``--filter`` and `the tutorial on writing filters`__. __ http://johnmacfarlane.net/pandoc/scripting.html For an alternative library for writing pandoc filters, with a more "Pythonic" design, see `panflute`__. __ https://github.com/sergiocorreia/panflute Compatibility ---------------- Pandoc 1.16 introduced link and image `attributes` to the existing `caption` and `target` arguments, requiring a change in pandocfilters that breaks backwards compatibility. Consequently, you should use: - pandocfilters version <= 1.2.4 for pandoc versions 1.12--1.15, and - pandocfilters version >= 1.3.0 for pandoc versions >= 1.16. Pandoc... ## AI interpretation — verify before relying pandocfilters is a Python library for writing pandoc filters that transform Pandoc's JSON AST representation by reading from stdin, applying custom transformations, and writing modified output to stdout. Verdict: pandocfilters is a stable, dependency-free utility for building pandoc document transformations in Python. Its permissive BSD license and broad Python version support make it suitable for production use, though the aging maintenance status (938 days since release) suggests checking compatibility with your specific pandoc version before deployment. [View on SkillFed](https://skillfed.io/packages/pandocfilters) · [View on PyPI](https://pypi.org/project/pandocfilters/)