{"categories":[{"label":"Build Tools","url":"https://skillfed.io/packages/category/software-development-build-tools/4"},{"label":"Filters","url":"https://skillfed.io/packages/category/text-processing-filters"}],"enrichment":{"capability":"Panflute provides a Pythonic interface for writing Pandoc filters, allowing you to programmatically transform documents between markup formats by manipulating their abstract syntax trees.","skillfed_tags":["document-processing","pandoc-integration","markup-transformation"],"use_cases":["Rewrite internal document links or citations during Markdown-to-HTML conversion for a static site generator.","Transform code blocks with custom syntax into formatted output (e.g., mermaid diagrams to SVG).","Inject metadata or styling directives into LaTeX output for academic papers written in Markdown.","Strip or modify elements (images, scripts, comments) when converting documents for different audiences.","Automate document preprocessing for research workflows that combine Markdown, Pandoc, and custom logic."],"what_it_does":"Panflute is a Python wrapper around Pandoc's document processing pipeline that lets you write filters by manipulating document elements as Python objects rather than working directly with JSON. It depends on click for CLI handling and pyyaml for configuration, and requires a matching Pandoc binary installed on your system to function.\n\nYou write a filter function that receives document elements (paragraphs, text, code blocks, etc.) and returns transformed versions of them. Panflute handles the marshalling between Pandoc's JSON representation and Python objects, so you work with readable class instances instead of raw data structures. This is most useful when you need to customize how Pandoc converts between formats\u2014for example, rewriting links, injecting metadata, or applying domain-specific transformations to code blocks.","worth_installing":"Yes, if you need to programmatically transform documents via Pandoc and want to avoid writing raw JSON filters. Install friction is low and the license is permissive. Be aware that the package has not been released in 877 days; check that your Pandoc version (2.11.0.4\u20133.1.x for version 2.3.1) is compatible before committing to it for production workflows."},"id":"panflute","links":{"html":"https://skillfed.io/packages/panflute","md":"https://skillfed.io/packages/panflute.md","pypi":"https://pypi.org/project/panflute/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2024-03-20","license_spdx":null,"license_treatment":"permissive","name":"panflute","python_support":"supports_current","summary":"Pythonic Pandoc filters"},"popularity":{"monthly_downloads":169668,"position":10411,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.3.1"}
