Skip to main content

pannb—pandoc filter for ipynb

Project description

Date:
September 2, 2021

docs

Documentation Status image2

tests

GitHub Actions Coverage Status

Codacy Code Quality Status Scrutinizer Status CodeClimate Quality Status

package

Supported versions Supported implementations PyPI Wheel

PyPI Package latest release GitHub Releases Development Status Downloads

Commits since latest release License

conda-forge

Conda Recipe Conda Downloads Conda Version Conda Platforms

Introduction

Pandoc supports ipynb format. What this does is add support of

  1. jupytext style yaml metadata block

  2. filter out the Python code block

  3. convert raw block to native pandoc AST, e.g.

    • if a cell outputs HTML, then it is an HTML raw block by default, meaning only HTML-like output formats contains these output cells. This filter convert them using pandoc itself to native pandoc AST so that any output formats will contains the same output.

These 3 filters are implemented as 3 individual functions, so that you can cherry-pick your own combinations (See API doc). The command line program pannb have all 3 included.

Example

See docs/example.ipynb for the input notebook and its output without the filter and output with the filter. Note that the output will be correct only if you set --ipynb-output=html after this patch is merged.

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

pannb-0.1.0.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

pannb-0.1.0-py3-none-any.whl (7.9 kB view hashes)

Uploaded Python 3

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