Preprocessor for target filetype

0 votes
asked Jan 14, 2019 in Wanted features by Janus
It would be cool if there is a way to get the target filetype.

A usecase for that would be the way links are displayed....

!ifdef TYPE_SVG

"[[filepath component]]

!else

"component\n<filepath>"

!endif

1 Answer

0 votes
answered Jan 14, 2019 by Serge Wenger Work (15,620 points)

For PNG:

java.exe -jar plantuml.jar -charset UTF-8 -DFILE_FORMAT_PNG=1 -gui 

For SVG:

java.exe -jar plantuml.jar -charset UTF-8 -tsvg -DFILE_FORMAT_SVG=1 -gui .

@startuml 
!ifdef FILE_FORMAT_PNG
Alice -> Bob: png
!else
Alice -> Bob: svg
!endif
@enduml

http://www.plantuml.com/plantuml/png/SoWkIImgAStDKU1Ip4nBIKrJSFFqSOrtym_oTGo93_1pvtBCoKnELT2rKt3AJx9IACXBvr9CpIbEHHClBWE9vwLafd4v02cWWG00

commented Jan 17, 2019 by Janus
I already used that by myself. It's working, but its not ideal.
Neverless. THANK you.
...