对于程序员来说,什么软件不如自己写代码来画图,我自己就写了一个,其实很简单,也就是基于 graphviz 和 plantuml 做一个 Web 界面,当然命令行也是一样的,详情参见 https://github.com/walterfan/webdiagram,基本功能都有了,如果有人有兴趣我可以再增强完善一下。
界面如下
再举几个例子
脚本如下
start -> IsExceedMaxAttempts IsExceedMaxAttempts -> Login[cond=no] IsExceedMaxAttempts -> LockAccount[cond=yes] LockAccount -> DisplayAlert Login -> IsAuthorized IsAuthorized -> GrantAccess[cond="yes"] IsAuthorized -> IsExceedMaxAttempts[cond="no"] GrantAccess -> end DisplayAlert -> end fab draw:./examples/login-flowchart.txt,./examples/login-flowchart.png
图片如下
脚本如下
title TCP handshake participant client participant server autonumber "<b>[00]" == open == note right of server: LISTEN client -> server: SYN note left of client: SYN_SENT note right of server: SYN_RCVD server --> client: ACK/SYN server -> client: ACK note over client, server: ESTABILISHED == close == client -> server: FIN note left of client: FIN_WAIT_1 note right of server: CLOSE_WAIT server --> client: ACK note left of client: FIN_WAIT_2 server -> client: FIN note right of server: LAST_ACK note left of client: TIME_WAIT client --> server: ACK note right of server #FFAAAA: CLOSED
脚本如下
[*] --> Created: new Created --> Ready: start Ready --> Running: run Running --> Ready: yield, interrupt Running --> Waiting: wait, sleep, suspend Waiting --> Ready: notify, resume Running --> Terminated Terminated --> [*]
本站所有内容均为互联网搜索引擎提供的公开搜索信息,本站不存储任何数据与内容,任何内容与数据均与本站无关,如有需要请联系相关搜索引擎包括但不限于百度,google,bing,sogou 等
© 2025 tinynews.org All Rights Reserved. 百科问答小站 版权所有