For refactoring the state machine in waschbot, I wanted to draw a state diagram.
I wanted some program that would transform a textual representation of the diagram into an image file, eg.
The first tool I found was
a metric crapton of 46 dependencies and b) the command-line tool (
mermaid.cli) has seen no commits for 2 years and c) the examples wouldn’t compile.
The demo web-editor was okay, though.
After some more googling, I found PlantUML and it’s pretty much what I wanted.
Install the tool:
$ brew install plantuml
@startuml [*] -right-> tanz: start tanz -down-> [*]: stop tanz -right-> rüttel rüttel -up-> schüttel schüttel -left-> wirf wirf -down-> tanz @enduml
Compile the example:
$ plantuml example.uml
PlantUML supports theming to make the output less ugly,
skinparam monochrome true seems to be a good starting point.
Compiling takes a little too long for my taste, apart from that I’m happy.