python - PlantUml 到序列图
问题描述
我用谷歌搜索了所有内容,但找不到将 PLANTUML 转换为 python 中的序列图的工具
是否有任何库/工具可以使用 python 将 Plantuml 转换为序列图?
我知道这个在线工具是这样做的:https ://www.planttext.com/ 但我想自动化这个过程,所以我不想使用在线工具
编辑 :
@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
谢谢,
哈利
解决方案
PlantUML 是一个 Java 程序,因此您需要先安装 Java 运行时,但另一方面,您不需要 Python。
1)从http://plantuml.com/de/download下载plantuml.jar
2)从命令行运行
java -jar path/to/downloaded/plantuml.jar path/to/your/plantUMLfile.txt
您的文件是plantUMLfile.png
在执行目录中生成的。
用于java -jar plantuml.jar -help
完整的参数列表以充分利用命令行工具。
推荐阅读
- javascript - 使用 preventDefault 功能后有没有办法提交这个表单?
- java - springdoc中open api和code的关联
- javascript - 如何在反应中使用函数更改css属性
- blazor - WebSocket 连接失败(服务器端 blazor)
- flutter - 用户激活 searchdelegate 时如何仅在第一次调用 buildsuggestion
- reactjs - Recharts:条形图中每个条形的不同渐变
- php - 无法获取加入多个 Eloquent 关系的数据
- fuse - 在 appimage 中使用 unionfs
- javascript - 反应树视图库
- javascript - 自动脚本打开模式并单击它