Metadata-Version: 2.2
Name: pandoc-plantuml-filter
Version: 0.0.0
Summary: Pandoc filter for PlantUML code blocks
Author-email: Timo Furrer <tuxtimo@gmail.com>
License: MIT
Keywords: plantuml,pandoc-filter,pandoc
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandocfilters

# 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.
