Search code examples
pythonumlplantuml

PlantUml to Sequence Diagram


I googled it all but not able to find the tool to convert PLANTUML to the sequence diagram in python

Is there any library / tool for converting the plantuml to sequence diagram using python?

I understand this online tool does this : https://www.planttext.com/ but I want to automate the process so I don't want to use the online tool

Edit :

@startuml
participant ClassA as Class_UmlA
participant ClassB as Class_UmlB

note right of Class_UmlA: Function to test
    Class_UmlA -> Class_UmlB  : Function1 
    activate Class_UmlA
@enduml

Thanks,
Harry


Solution

  • PlantUML is a Java program, so you need a Java Runtime installed as pre-requirement, but on the other hand you don't need Python.

    1) download plantuml.jar from http://plantuml.com/de/download

    2) run from commandline java -jar path/to/downloaded/plantuml.jar path/to/your/plantUMLfile.txt

    your file is generated as plantUMLfile.png in the directory of execution.

    Use java -jar plantuml.jar -help for a full list of parameters to make full use of the commandline tool.