Pandoc filter for PlantUML code blocks
Project description
pandoc-plantuml-filter
Pandoc filter which converts PlantUML code blocks to PlantUML images.
```plantuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
```
Usage
Install it with pip:
pip install pandoc-plantuml-filter
And use it like any other pandoc filter:
pandoc tests/sample.md -o sample.pdf --filter pandoc-plantuml
The PlantUML binary must be in your $PATH
or can be set with the
PLANTUML_BIN
environment variable.
Additional parameters
You could pass additional parameters into plantuml
filter which will be processed as picture's options:
```{ .plantuml height=50% plantuml-filename=test.png }
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
```
The plantuml-filename
parameter create a symlink for the destination picture, which could be used in the same file as an image directly.
Control the output file-type
The generated file-type can be controlled via the file metadata:
---
plantuml-format: svg
---
Or directly via the cli --metadata
argument.
pandoc tests/sample.md -o sample.pdf --filter pandoc-plantuml --metadata=plantuml-format=svg
But there is ...
There are a few other filters trying to convert PlantUML code blocks however they all failed for me.
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
Built Distribution
File details
Details for the file pandoc-plantuml-filter-0.1.5.tar.gz
.
File metadata
- Download URL: pandoc-plantuml-filter-0.1.5.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6a5de219b82bb8e26f44a0f08f2fb32011ba04c0df753b294b7db9308646584 |
|
MD5 | 3787d40272843559719bf936d183f702 |
|
BLAKE2b-256 | bee2e48d2c5053e566f89076a0d650d44ff8a1132701100da054c32fc557ee0d |
File details
Details for the file pandoc_plantuml_filter-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: pandoc_plantuml_filter-0.1.5-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad8e00752a14acf2a308914615d5ba394a0cea1c6209078076b8cb4e45c6112d |
|
MD5 | 423dbcc8c3c055a03cf0928f4f0ac624 |
|
BLAKE2b-256 | 30e24c488b67ef92bebc946632dd8b68b66b7cff8a9efd5b5401c919594bd049 |