笔记中一些画流程图工具

131 阅读1分钟

平时记录笔记,经常会遇到画图的情况,这里有一些画流程图的工具,当然这些脚本不仅可以画流程图,还能画其他的,在这里只讲流程图的画法。我比较喜欢第一个的样式,其他的样式不太好看

1. mermaid flowchart

Flowcharts Syntax | Mermaid

flowchart LR
S([开始])--说明-->B(圆角)-->C-->D{对吗}
D-->|yes| F[对的]-->E([结束])
D-->|no|E
flowchart LR
S([开始])--说明-->B(圆角)-->C-->D{对吗}
D-->|yes| F[对的]-->E([结束])
D-->|no|E

2. flowchart

flowchart.js

st=>start: 开始
end=>end: 结束
o1=>operation: 操作1
o2=>operation: 操作2
io=>inputoutput: 输入参
c1=>condition: 条件语句

st->io->c1
c1(yes)->o1->end
c1(no)->o2->end

image.png

3. Graphviz

neatoguide.pdf (graphviz.org)

digraph G{
A -> {B C}
B -> D
}

image.png

graph G{
	A -- {B C D}
	C -- E
}

image.png

4. planUML

使用简单的文字描述画UML图的开源工具。 (plantuml.com)

@startuml
title 测试
start
:操作一;
if (是否是对的) then(yes)
:操作2;
else(no)
:操作3;
endif
end
@enduml

image.png