diff options
Diffstat (limited to 'readme.md')
-rw-r--r-- | readme.md | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..015e375 --- /dev/null +++ b/readme.md | |||
@@ -0,0 +1,56 @@ | |||
1 | pandoc-filter-plantuml | ||
2 | ====================== | ||
3 | |||
4 | A Pandoc AST filter rendering PlantUML code blocks into vector diagrams. | ||
5 | |||
6 | This filter produces TikZ code that must then be rendered using another filter such as | ||
7 | [tikz.py][tikz]. | ||
8 | |||
9 | |||
10 | Usage | ||
11 | ----- | ||
12 | |||
13 | A PlantUML diagram in an example Pandoc Markdown file `example.md`: | ||
14 | |||
15 | ```puml | ||
16 | @startuml | ||
17 | Bob->Alice : hello | ||
18 | @enduml | ||
19 | ``` | ||
20 | |||
21 | Using the helper scripts [tikz.py][tikz] and `pandoc-filter-plantuml.sh`: | ||
22 | |||
23 | #/bin/sh | ||
24 | java -jar pandoc-filter-plantuml.jar <&0 | ||
25 | |||
26 | Can be rendered and included as a vector resource in a PDF by running: | ||
27 | |||
28 | % pandoc --filter=pandoc-filter-plantuml.sh \ | ||
29 | --filter=tikz.py \ | ||
30 | --output=example.pdf \ | ||
31 | example.md | ||
32 | |||
33 | Or as an image in an HTML document with the following command: | ||
34 | |||
35 | % pandoc --filter=pandoc-filter-plantuml.sh \ | ||
36 | --filter=tikz.py \ | ||
37 | --output=example.html \ | ||
38 | example.md | ||
39 | |||
40 | |||
41 | Build | ||
42 | ----- | ||
43 | |||
44 | The project can be built using the Gradle `build` task. | ||
45 | |||
46 | An autonomous jar file can be generated using the `jar` task. | ||
47 | |||
48 | |||
49 | License | ||
50 | ------- | ||
51 | |||
52 | Project released under the terms of the GNU GPL v3. | ||
53 | See /license.txt | ||
54 | |||
55 | |||
56 | [tikz]: https://github.com/jgm/pandocfilters/blob/master/examples/tikz.py | ||