This a tool to compile Plant UML into files and links.
go get -u github.com/lonnblad/gopuml
The command used to compile the Plant UML to different formats.
gopuml build
-
-f, --format
The format to use when compiling the Plant UML, defaults to:
svg
.Supported formatters are:
png
, will format the content as .pngsvg
, will format the content as .svgtxt
, will format the content as .txt
-
--server
The Server URL to use when the style used is
link
, defaults to:https://www.planttext.com/api/plantuml
. -
--style
The style to use when compiling the Plant UML, defaults to:
file
.Supported styles are:
file
, will write the formatted content to a filelink
, will write a link to the formatted content to stdoutout
, will write the formatted content to stdout
These examples can be found here.
The source Plant UML.
@startuml Example
Bob -> Alice : hello
@enduml
Compiles example.png.
gopuml build -f png example/example.puml
Compiles example.svg.
gopuml build -f svg example/example.puml
Compiles example.txt.
gopuml build -f txt example/example.puml
┌───┐ ┌─────┐
│Bob│ │Alice│
└─┬─┘ └──┬──┘
│ hello │
│──────────────>│
┌─┴─┐ ┌──┴──┐
│Bob│ │Alice│
└───┘ └─────┘
Generates a link for the example.png.
gopuml build -f png --style link example/example.puml
Generates a link for the example.svg.
gopuml build -f svg --style link example/example.puml
Generates a link for the example.txt.
gopuml build -f txt --style link example/example.puml