Skip to main content

pandoc-d2-filter

Pandoc filter to convert d2 code blocks to images.

```{.d2 pad=20}
x -> y
```

Usage

Install it with pip:

pip install pandoc-d2-filter

And use it like any other pandoc filter:

pandoc tests/testdata/default.md -o default.pdf --filter pandoc-d2

The d2 binary is either part of the $PATH or can be configured via D2_BIN environment variable. If you use other output formats than svg, you should d2 init-playwright before the first use.

Configuration

TODO check tests/testdata for now.

Inspiration

This filter is heavily inspired by the JavaScript d2-filter and the pandoc-plantuml-filter.

Thanks Omar & Timo

Metadata

Release files for pandoc-d2-filter 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pandoc-d2-filter 0.1.0
File Size Uploaded Provenance Actions
pandoc_d2_filter-0.1.0.tar.gz 5.4 kB Without provenance Details for pandoc_d2_filter-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pandoc-d2-filter 0.1.0
File Interpreter ABI Platform Actions
pandoc_d2_filter-0.1.0-py3-none-any.whl Python 3 none any Details for pandoc_d2_filter-0.1.0-py3-none-any.whl

Total release size: 9.4 kB

Release files / pandoc_d2_filter-0.1.0.tar.gz

Download URL pandoc_d2_filter-0.1.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8bde3b86a32edcc885669aff15addbcd48244ddfb5bdd2578c5ad8b263a1c2b0
BLAKE2b-256 checksum
How to use checksums
a3b5fb4d42a4f58a294dabf8b617dcd3c9bc3482d4d93a624d3afdc40b53fc78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / pandoc_d2_filter-0.1.0-py3-none-any.whl

Download URL pandoc_d2_filter-0.1.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54da3a719af05e6c66296ce13417df245181747920fc628fb3eb6121f8c6d46b
BLAKE2b-256 checksum
How to use checksums
9a55057f9f1cc2838b853f531bc396465ad0c57ce6ef7c21427b60e5a22e2ca0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Security for pandoc-d2-filter 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page