Skip to main content

Pythonic Pandoc filters

Project description

Panflute: Pythonic Pandoc Filters

Development Status Build Status License DOI

GitHub Releases PyPI version Conda Version Python version Supported implementations

panflute is a Python package that makes creating Pandoc filters fun.

For a detailed user guide, documentation, and installation instructions, see http://scorreia.com/software/panflute/. For examples that you can use as starting points, check the examples repo, the sample template, or this github search. If you want to contribute, head here.

You might also find useful this presentation on how I use markdown+pandoc+panflute to write research papers (at the Banco de Portugal 2019 Workshop on Reproductible Research).

Installation

Pip

To manage panflute using pip, open the command line and run

  • pip install panflute to install
    • pip install "panflute[extras]" to include extra dependencies (yamlloader)
  • pip install -U panflute to upgrade
  • pip uninstall panflute to remove

You need a matching pandoc version for panflute to work flawlessly. See [Supported pandoc versions] for details. Or, use the [Conda] method to install below to have the pandoc version automatically managed for you.

Conda

To manage panflute with a matching pandoc version, open the command line and run

  • conda install -c conda-forge pandoc 'panflute>=2.0.5' to install both conda install -c conda-forge pandoc 'panflute>=2.0.5' yamlloader to include extra dependencies
  • conda update pandoc panflute to upgrade both
  • conda remove pandoc panflute to remove both

You may also replace conda by mamba, which is basically a drop-in replacement of the conda package manager. See mamba-org/mamba: The Fast Cross-Platform Package Manager for details.

Note on versions

Supported Python versions

panflute 1.12 or above dropped support of Python 2. When using Python 3, depending on your setup, you may need to use pip3/python3 explicitly. If you need to use panflute in Python 2, install panflute 1.11.x or below.

Currently supported Python versions: Python version. Check setup.py for details, which further indicates support of pypy on top of CPython.

Supported pandoc versions

pandoc versioning semantics is MAJOR.MAJOR.MINOR.PATCH and panflute's is MAJOR.MINOR.PATCH. Below we shows matching versions of pandoc that panflute supports, in descending order. Only major version is shown as long as the minor versions doesn't matter.

panflute version supported pandoc versions supported pandoc API versions
2.1.3 2.11.0.4–2.17.x 1.22–1.22.1
2.1 2.11.0.4—2.14.x 1.22
2.0 2.11.0.4—2.11.x 1.22
not supported 2.10 1.21
1.12 2.7-2.9 1.17.5–1.20

Note: pandoc 2.10 is short lived and 2.11 has minor API changes comparing to that, mainly for fixing its shortcomings. Please avoid using pandoc 2.10.

Dev Install

After cloning the repo and opening the panflute folder, run

  • python setup.py install to install the package locally
  • python setup.py develop to install locally with a symlink so changes are automatically updated

Contributing

Feel free to submit push requests. For consistency, code should comply with pep8 (as long as its reasonable), and with the style guides by @kennethreitz and google. Read more here.

License

BSD3 license (following pandocfilters by @jgm).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

panflute-2.2.3.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

panflute-2.2.3-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

File details

Details for the file panflute-2.2.3.tar.gz.

File metadata

  • Download URL: panflute-2.2.3.tar.gz
  • Upload date:
  • Size: 36.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for panflute-2.2.3.tar.gz
Algorithm Hash digest
SHA256 009333fa0b7c59ae396856522e6d794638a22652679160b82e86e4f28f0fbbc6
MD5 cb6da339aef38bed17e3ab3bc80eafa8
BLAKE2b-256 730e97e53bfcc7166af91fec97ed4c43af44238f28249e479ec26246e3ae3d5d

See more details on using hashes here.

Provenance

File details

Details for the file panflute-2.2.3-py3-none-any.whl.

File metadata

  • Download URL: panflute-2.2.3-py3-none-any.whl
  • Upload date:
  • Size: 36.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for panflute-2.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 410e799c193b186a38f5e1b9a0f489a27387dd8f9f3f3a9e8282cdd04dd922b6
MD5 9e04c718d6b08af9ccfc2b8a49860ed4
BLAKE2b-256 14f9f81e1ae6fa587703e4a1652d2f72eae4ca2ba5f1687da8fe3f1e7d133feb

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page