- Description: Wrapper around Plant
UML
jar library - Licence: Unlicense
- Author: Alexander Artemenko svetlyak.40wt@gmail.com
- Homepage: https://40ants.com/plantuml
- Bug tracker: https://github.com/40ants/plantuml/issues
- Source control: GIT
- Depends on: alexandria, serapeum
You can install this library from Quicklisp, but you want to receive updates quickly, then install it from Ultralisp.org:
(ql-dist:install-dist "http://dist.ultralisp.org/"
:prompt nil)
(ql:quickload :40ants-plantuml)
To make a diagram, first you need to download JAR
file with
Java program PlantUML
from official site https://plantuml.com/.
Then you'll have to set a path to this JAR
file like this:
CL-USER> (setf 40ants-plantuml:*path-to-jar*
"~/plantuml-mit-1.2024.8.jar")
And of cause you will need some Java implementation suitable
for running this JAR
file.
Here is how to render a sequence diagram to PNG
file:
CL-USER> (40ants-plantuml:render "
@startuml
CommoLisp -> PlantUML : render
activate PlantUML
return PNG file
@enduml
"
#P"/tmp/diagram.png")
; No values
It will render an image like this:
package 40ants-plantuml
function 40ants-plantuml:render
diagram-code output-filename
variable 40ants-plantuml:*path-to-graphviz*
nil
If given, should be a path to dot
binary of Graphviz. Will be passed as -graphvizdot option to the PlantUML
.
variable 40ants-plantuml:*path-to-jar*
nil
Set this variable to a path to the plantuml.jar. Note, there are different builds of plantuml with different licensing.
If this variable is NIL
, then /usr/share/plantuml/plantuml.jar will be used if it is exists. On Ubuntu this file
is created when use do apt install plantuml
. Note, the version of the PlantUML
in the Ubuntu package could be outdated
and missing some important features.