internal: Add legend.svg

This commit is contained in:
Mizux Seiha
2020-09-30 18:23:42 +02:00
parent 01fcb733e3
commit 33638a15ba
9 changed files with 671 additions and 109 deletions

View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euxo pipefail
# Check plantuml is in PATH
command -v plantuml
rm -f "*.svg"
for i in *.dot; do
plantuml -Tsvg "$i";
done

View File

@@ -0,0 +1,50 @@
@startdot
digraph Legend {
rankdir=LR;
bgcolor=white;
subgraph clusterLegend {
color=black;
bgcolor=white;
label = "Legend";
node [shape=rect, style=filled, color=black, fillcolor=white];
# C++ Stuff
CPP [label="Foo.cpp", shape=note, fillcolor=royalblue];
CPP_LGD [label=": C++ source file", color=none];
CPP -> CPP_LGD [arrowhead=none, style=invisible];
LIB [label="Foo.so", shape=component, fillcolor=royalblue];
LIB_LGD [label=": Shared library (i.e. binary)", color=none];
LIB -> LIB_LGD [arrowhead=none, style=invisible];
# Python Stuff
PYTHON [label="pywrapfoo.py", shape=note, fillcolor=gold];
PYTHON_LGD [label=": Python source file", color=none];
PYTHON -> PYTHON_LGD [arrowhead=none, style=invisible];
PYWRP [label="_pywrapfoo.so", shape=component, fillcolor=gold];
PYWRP_LGD [label=": C++ wrapper output (i.e. binary)", color=none];
PYWRP -> PYWRP_LGD [arrowhead=none, style=invisible];
WHL [label="foo-<version>-cp3*-cp3*-<platform>.whl", shape=folder, fillcolor=gold];
WHL_LGD [label=": Python package file (i.e. wheel archive)", color=none];
WHL -> WHL_LGD [arrowhead=none, style=invisible];
# Links meaning
A [label="A", shape=note, fillcolor=white];
B [label="B", shape=note, fillcolor=white];
CMD_LGD [label=": 'cmd [...] A' will generate file B from A.", color=none];
A -> B [label="cmd", style=bold];
B -> CMD_LGD [arrowhead=none, style=invisible];
C [label="A", shape=note, fillcolor=white];
D [label="B", shape=note, fillcolor=white];
REF_LGD [label=": B references file A (i.e. B depends on A)\n'ref' may refer to the keyword use in B.", color=none];
C -> D [label="ref", style=dashed];
D -> REF_LGD [arrowhead=none, style=invisible];
E [label="E", shape=note, fillcolor=white];
F [label="F", shape=folder, fillcolor=white];
FOLDER_LGD [label=": Archive F contains file E (i.e. F depends on E).", color=none];
E -> F [label="pack", style=dashed];
F -> FOLDER_LGD [arrowhead=none, style=invisible];
}
}
@enddot
# vim: set tw=0 ts=2 sw=2 expandtab:

View File

@@ -0,0 +1,204 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.44.1 (0)
-->
<!-- Title: Legend Pages: 1 -->
<svg width="1121pt" height="477pt"
viewBox="0.00 0.00 1121.00 477.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 473)">
<title>Legend</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-473 1117,-473 1117,4 -4,4"/>
<g id="clust1" class="cluster">
<title>clusterLegend</title>
<polygon fill="white" stroke="black" points="8,-8 8,-461 1105,-461 1105,-8 8,-8"/>
<text text-anchor="middle" x="556.5" y="-445.8" font-family="Times,serif" font-size="14.00">Legend</text>
</g>
<!-- CPP -->
<g id="node1" class="node">
<title>CPP</title>
<polygon fill="royalblue" stroke="black" points="202.5,-430 136.5,-430 136.5,-394 208.5,-394 208.5,-424 202.5,-430"/>
<polyline fill="none" stroke="black" points="202.5,-430 202.5,-424 "/>
<polyline fill="none" stroke="black" points="208.5,-424 202.5,-424 "/>
<text text-anchor="middle" x="172.5" y="-408.3" font-family="Times,serif" font-size="14.00">Foo.cpp</text>
</g>
<!-- CPP_LGD -->
<g id="node2" class="node">
<title>CPP_LGD</title>
<polygon fill="white" stroke="transparent" points="620.5,-430 482.5,-430 482.5,-394 620.5,-394 620.5,-430"/>
<text text-anchor="middle" x="551.5" y="-408.3" font-family="Times,serif" font-size="14.00">: C++ source file</text>
</g>
<!-- CPP&#45;&gt;CPP_LGD -->
<g id="edge1" class="edge">
<title>CPP&#45;&gt;CPP_LGD</title>
</g>
<!-- LIB -->
<g id="node3" class="node">
<title>LIB</title>
<polygon fill="royalblue" stroke="black" points="203.5,-376 141.5,-376 141.5,-372 137.5,-372 137.5,-368 141.5,-368 141.5,-348 137.5,-348 137.5,-344 141.5,-344 141.5,-340 203.5,-340 203.5,-376"/>
<polyline fill="none" stroke="black" points="141.5,-372 145.5,-372 145.5,-368 141.5,-368 "/>
<polyline fill="none" stroke="black" points="141.5,-348 145.5,-348 145.5,-344 141.5,-344 "/>
<text text-anchor="middle" x="172.5" y="-354.3" font-family="Times,serif" font-size="14.00">Foo.so</text>
</g>
<!-- LIB_LGD -->
<g id="node4" class="node">
<title>LIB_LGD</title>
<polygon fill="white" stroke="transparent" points="659.5,-376 443.5,-376 443.5,-340 659.5,-340 659.5,-376"/>
<text text-anchor="middle" x="551.5" y="-354.3" font-family="Times,serif" font-size="14.00">: Shared library (i.e. binary)</text>
</g>
<!-- LIB&#45;&gt;LIB_LGD -->
<g id="edge2" class="edge">
<title>LIB&#45;&gt;LIB_LGD</title>
</g>
<!-- PYTHON -->
<g id="node5" class="node">
<title>PYTHON</title>
<polygon fill="gold" stroke="black" points="223,-322 116,-322 116,-286 229,-286 229,-316 223,-322"/>
<polyline fill="none" stroke="black" points="223,-322 223,-316 "/>
<polyline fill="none" stroke="black" points="229,-316 223,-316 "/>
<text text-anchor="middle" x="172.5" y="-300.3" font-family="Times,serif" font-size="14.00">pywrapfoo.py</text>
</g>
<!-- PYTHON_LGD -->
<g id="node6" class="node">
<title>PYTHON_LGD</title>
<polygon fill="white" stroke="transparent" points="628.5,-322 474.5,-322 474.5,-286 628.5,-286 628.5,-322"/>
<text text-anchor="middle" x="551.5" y="-300.3" font-family="Times,serif" font-size="14.00">: Python source file</text>
</g>
<!-- PYTHON&#45;&gt;PYTHON_LGD -->
<g id="edge3" class="edge">
<title>PYTHON&#45;&gt;PYTHON_LGD</title>
</g>
<!-- PYWRP -->
<g id="node7" class="node">
<title>PYWRP</title>
<polygon fill="gold" stroke="black" points="232,-268 113,-268 113,-264 109,-264 109,-260 113,-260 113,-240 109,-240 109,-236 113,-236 113,-232 232,-232 232,-268"/>
<polyline fill="none" stroke="black" points="113,-264 117,-264 117,-260 113,-260 "/>
<polyline fill="none" stroke="black" points="113,-240 117,-240 117,-236 113,-236 "/>
<text text-anchor="middle" x="172.5" y="-246.3" font-family="Times,serif" font-size="14.00">_pywrapfoo.so</text>
</g>
<!-- PYWRP_LGD -->
<g id="node8" class="node">
<title>PYWRP_LGD</title>
<polygon fill="white" stroke="transparent" points="683,-268 420,-268 420,-232 683,-232 683,-268"/>
<text text-anchor="middle" x="551.5" y="-246.3" font-family="Times,serif" font-size="14.00">: C++ wrapper output (i.e. binary)</text>
</g>
<!-- PYWRP&#45;&gt;PYWRP_LGD -->
<g id="edge4" class="edge">
<title>PYWRP&#45;&gt;PYWRP_LGD</title>
</g>
<!-- WHL -->
<g id="node9" class="node">
<title>WHL</title>
<polygon fill="gold" stroke="black" points="329,-214 326,-218 305,-218 302,-214 16,-214 16,-178 329,-178 329,-214"/>
<text text-anchor="middle" x="172.5" y="-192.3" font-family="Times,serif" font-size="14.00">foo&#45;&lt;version&gt;&#45;cp3*&#45;cp3*&#45;&lt;platform&gt;.whl</text>
</g>
<!-- WHL_LGD -->
<g id="node10" class="node">
<title>WHL_LGD</title>
<polygon fill="white" stroke="transparent" points="704,-214 399,-214 399,-178 704,-178 704,-214"/>
<text text-anchor="middle" x="551.5" y="-192.3" font-family="Times,serif" font-size="14.00">: Python package file (i.e. wheel archive)</text>
</g>
<!-- WHL&#45;&gt;WHL_LGD -->
<g id="edge5" class="edge">
<title>WHL&#45;&gt;WHL_LGD</title>
</g>
<!-- A -->
<g id="node11" class="node">
<title>A</title>
<polygon fill="white" stroke="black" points="193.5,-160 145.5,-160 145.5,-124 199.5,-124 199.5,-154 193.5,-160"/>
<polyline fill="none" stroke="black" points="193.5,-160 193.5,-154 "/>
<polyline fill="none" stroke="black" points="199.5,-154 193.5,-154 "/>
<text text-anchor="middle" x="172.5" y="-138.3" font-family="Times,serif" font-size="14.00">A</text>
</g>
<!-- B -->
<g id="node12" class="node">
<title>B</title>
<polygon fill="white" stroke="black" points="572.5,-160 524.5,-160 524.5,-124 578.5,-124 578.5,-154 572.5,-160"/>
<polyline fill="none" stroke="black" points="572.5,-160 572.5,-154 "/>
<polyline fill="none" stroke="black" points="578.5,-154 572.5,-154 "/>
<text text-anchor="middle" x="551.5" y="-138.3" font-family="Times,serif" font-size="14.00">B</text>
</g>
<!-- A&#45;&gt;B -->
<g id="edge6" class="edge">
<title>A&#45;&gt;B</title>
<path fill="none" stroke="black" stroke-width="2" d="M199.71,-142C265.6,-142 438.29,-142 514.02,-142"/>
<polygon fill="black" stroke="black" stroke-width="2" points="514.46,-145.5 524.46,-142 514.46,-138.5 514.46,-145.5"/>
<text text-anchor="middle" x="364" y="-145.8" font-family="Times,serif" font-size="14.00">cmd</text>
</g>
<!-- CMD_LGD -->
<g id="node13" class="node">
<title>CMD_LGD</title>
<polygon fill="white" stroke="transparent" points="1070,-162 768,-162 768,-126 1070,-126 1070,-162"/>
<text text-anchor="middle" x="919" y="-140.3" font-family="Times,serif" font-size="14.00">: &#39;cmd [...] A&#39; will generate file B from A.</text>
</g>
<!-- B&#45;&gt;CMD_LGD -->
<g id="edge7" class="edge">
<title>B&#45;&gt;CMD_LGD</title>
</g>
<!-- C -->
<g id="node14" class="node">
<title>C</title>
<polygon fill="white" stroke="black" points="193.5,-106 145.5,-106 145.5,-70 199.5,-70 199.5,-100 193.5,-106"/>
<polyline fill="none" stroke="black" points="193.5,-106 193.5,-100 "/>
<polyline fill="none" stroke="black" points="199.5,-100 193.5,-100 "/>
<text text-anchor="middle" x="172.5" y="-84.3" font-family="Times,serif" font-size="14.00">A</text>
</g>
<!-- D -->
<g id="node15" class="node">
<title>D</title>
<polygon fill="white" stroke="black" points="572.5,-106 524.5,-106 524.5,-70 578.5,-70 578.5,-100 572.5,-106"/>
<polyline fill="none" stroke="black" points="572.5,-106 572.5,-100 "/>
<polyline fill="none" stroke="black" points="578.5,-100 572.5,-100 "/>
<text text-anchor="middle" x="551.5" y="-84.3" font-family="Times,serif" font-size="14.00">B</text>
</g>
<!-- C&#45;&gt;D -->
<g id="edge8" class="edge">
<title>C&#45;&gt;D</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M199.71,-88C265.6,-88 438.29,-88 514.02,-88"/>
<polygon fill="black" stroke="black" points="514.46,-91.5 524.46,-88 514.46,-84.5 514.46,-91.5"/>
<text text-anchor="middle" x="364" y="-91.8" font-family="Times,serif" font-size="14.00">ref</text>
</g>
<!-- REF_LGD -->
<g id="node16" class="node">
<title>REF_LGD</title>
<polygon fill="white" stroke="transparent" points="1073.5,-108 764.5,-108 764.5,-70 1073.5,-70 1073.5,-108"/>
<text text-anchor="middle" x="919" y="-92.8" font-family="Times,serif" font-size="14.00">: B references file A (i.e. B depends on A)</text>
<text text-anchor="middle" x="919" y="-77.8" font-family="Times,serif" font-size="14.00">&#39;ref&#39; may refer to the keyword use in B.</text>
</g>
<!-- D&#45;&gt;REF_LGD -->
<g id="edge9" class="edge">
<title>D&#45;&gt;REF_LGD</title>
</g>
<!-- E -->
<g id="node17" class="node">
<title>E</title>
<polygon fill="white" stroke="black" points="193.5,-52 145.5,-52 145.5,-16 199.5,-16 199.5,-46 193.5,-52"/>
<polyline fill="none" stroke="black" points="193.5,-52 193.5,-46 "/>
<polyline fill="none" stroke="black" points="199.5,-46 193.5,-46 "/>
<text text-anchor="middle" x="172.5" y="-30.3" font-family="Times,serif" font-size="14.00">E</text>
</g>
<!-- F -->
<g id="node18" class="node">
<title>F</title>
<polygon fill="white" stroke="black" points="578.5,-52 575.5,-56 554.5,-56 551.5,-52 524.5,-52 524.5,-16 578.5,-16 578.5,-52"/>
<text text-anchor="middle" x="551.5" y="-30.3" font-family="Times,serif" font-size="14.00">F</text>
</g>
<!-- E&#45;&gt;F -->
<g id="edge10" class="edge">
<title>E&#45;&gt;F</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M199.71,-34C265.6,-34 438.29,-34 514.02,-34"/>
<polygon fill="black" stroke="black" points="514.46,-37.5 524.46,-34 514.46,-30.5 514.46,-37.5"/>
<text text-anchor="middle" x="364" y="-37.8" font-family="Times,serif" font-size="14.00">pack</text>
</g>
<!-- FOLDER_LGD -->
<g id="node19" class="node">
<title>FOLDER_LGD</title>
<polygon fill="white" stroke="transparent" points="1097,-52 741,-52 741,-16 1097,-16 1097,-52"/>
<text text-anchor="middle" x="919" y="-30.3" font-family="Times,serif" font-size="14.00">: Archive F contains file E (i.e. F depends on E).</text>
</g>
<!-- F&#45;&gt;FOLDER_LGD -->
<g id="edge11" class="edge">
<title>F&#45;&gt;FOLDER_LGD</title>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.9 KiB