rice: Move and adapt dot graph, make script run scripts.
This commit is contained in:
parent
05f04a30ee
commit
f9a7a1031a
7 changed files with 494 additions and 37 deletions
353
content/posts/smart-rice-cooker/media/connections.svg
Normal file
353
content/posts/smart-rice-cooker/media/connections.svg
Normal file
|
|
@ -0,0 +1,353 @@
|
|||
<?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.0 (20200408.0750)
|
||||
-->
|
||||
<!-- Pages: 1 -->
|
||||
<svg width="1425pt" height="1258pt"
|
||||
viewBox="0.00 0.00 1425.00 1258.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 1254)">
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-1254 1421,-1254 1421,4 -4,4"/>
|
||||
<g id="clust1" class="cluster">
|
||||
<title>cluster_key</title>
|
||||
<polygon fill="none" stroke="black" points="957.24,-957.14 957.24,-1250.14 1417.24,-1250.14 1417.24,-957.14 957.24,-957.14"/>
|
||||
<text text-anchor="middle" x="1187.24" y="-1234.94" font-family="Times,serif" font-size="14.00">Key</text>
|
||||
</g>
|
||||
<g id="clust2" class="cluster">
|
||||
<title>cluster_doc</title>
|
||||
<polygon fill="none" stroke="black" points="1195.48,-1102.78 1195.48,-1218.78 1409.48,-1218.78 1409.48,-1102.78 1195.48,-1102.78"/>
|
||||
</g>
|
||||
<g id="clust3" class="cluster">
|
||||
<title>cluster_sub</title>
|
||||
<polygon fill="none" stroke="black" points="964.9,-965.18 964.9,-1183.18 1157.9,-1183.18 1157.9,-965.18 964.9,-965.18"/>
|
||||
</g>
|
||||
<g id="clust4" class="cluster">
|
||||
<title>cluster_directives</title>
|
||||
<polygon fill="none" stroke="black" points="0.32,-479.29 0.32,-1088.29 666.32,-1088.29 666.32,-479.29 0.32,-479.29"/>
|
||||
<text text-anchor="middle" x="333.32" y="-1073.09" font-family="Times,serif" font-size="14.00">Directives</text>
|
||||
</g>
|
||||
<g id="clust5" class="cluster">
|
||||
<title>cluster_primary</title>
|
||||
<polygon fill="none" stroke="black" points="526.56,-930.93 526.56,-1056.93 658.56,-1056.93 658.56,-930.93 526.56,-930.93"/>
|
||||
<text text-anchor="middle" x="592.56" y="-1041.73" font-family="Times,serif" font-size="14.00">Primary</text>
|
||||
</g>
|
||||
<g id="clust6" class="cluster">
|
||||
<title>cluster_secondary</title>
|
||||
<polygon fill="none" stroke="black" points="8.17,-487.45 8.17,-874.45 537.17,-874.45 537.17,-487.45 8.17,-487.45"/>
|
||||
<text text-anchor="middle" x="272.67" y="-859.25" font-family="Times,serif" font-size="14.00">Secondary</text>
|
||||
</g>
|
||||
<g id="clust7" class="cluster">
|
||||
<title>cluster_directives_lighting</title>
|
||||
<polygon fill="none" stroke="black" points="303.91,-711.09 303.91,-843.09 528.91,-843.09 528.91,-711.09 303.91,-711.09"/>
|
||||
<text text-anchor="middle" x="416.41" y="-827.89" font-family="Times,serif" font-size="14.00">Lighting</text>
|
||||
</g>
|
||||
<g id="clust8" class="cluster">
|
||||
<title>cluster_directives_temperature</title>
|
||||
<polygon fill="none" stroke="black" points="16.17,-540.76 16.17,-674.76 338.17,-674.76 338.17,-540.76 16.17,-540.76"/>
|
||||
<text text-anchor="middle" x="177.17" y="-659.56" font-family="Times,serif" font-size="14.00">Temperature</text>
|
||||
</g>
|
||||
<g id="clust9" class="cluster">
|
||||
<title>cluster_sensor</title>
|
||||
<polygon fill="none" stroke="black" points="890.36,-737.55 890.36,-813.55 1015.36,-813.55 1015.36,-737.55 890.36,-737.55"/>
|
||||
<text text-anchor="middle" x="952.86" y="-798.35" font-family="Times,serif" font-size="14.00">Sensors</text>
|
||||
</g>
|
||||
<g id="clust10" class="cluster">
|
||||
<title>cluster_api</title>
|
||||
<polygon fill="none" stroke="black" points="368.68,-0.23 368.68,-471.23 903.68,-471.23 903.68,-0.23 368.68,-0.23"/>
|
||||
<text text-anchor="middle" x="636.18" y="-456.03" font-family="Times,serif" font-size="14.00">api</text>
|
||||
</g>
|
||||
<g id="clust11" class="cluster">
|
||||
<title>cluster_api_sensor</title>
|
||||
<polygon fill="none" stroke="black" points="616.83,-69.05 616.83,-145.05 739.83,-145.05 739.83,-69.05 616.83,-69.05"/>
|
||||
<text text-anchor="middle" x="678.33" y="-129.85" font-family="Times,serif" font-size="14.00">sensor</text>
|
||||
</g>
|
||||
<g id="clust12" class="cluster">
|
||||
<title>cluster_recipe</title>
|
||||
<polygon fill="none" stroke="black" points="376.81,-8.44 376.81,-206.44 608.81,-206.44 608.81,-8.44 376.81,-8.44"/>
|
||||
<text text-anchor="middle" x="492.81" y="-191.24" font-family="Times,serif" font-size="14.00">recipe</text>
|
||||
</g>
|
||||
<g id="clust13" class="cluster">
|
||||
<title>cluster_schedule</title>
|
||||
<polygon fill="none" stroke="black" points="385.05,-34.58 385.05,-175.58 525.05,-175.58 525.05,-34.58 385.05,-34.58"/>
|
||||
<text text-anchor="middle" x="455.05" y="-160.38" font-family="Times,serif" font-size="14.00">schedule</text>
|
||||
</g>
|
||||
<g id="clust14" class="cluster">
|
||||
<title>cluster_settings</title>
|
||||
<polygon fill="none" stroke="black" points="666.41,-181.88 666.41,-439.88 895.41,-439.88 895.41,-181.88 666.41,-181.88"/>
|
||||
<text text-anchor="middle" x="780.91" y="-424.68" font-family="Times,serif" font-size="14.00">settings</text>
|
||||
</g>
|
||||
<g id="clust15" class="cluster">
|
||||
<title>cluster_time</title>
|
||||
<polygon fill="none" stroke="black" points="729.65,-332.52 729.65,-408.52 799.65,-408.52 799.65,-332.52 729.65,-332.52"/>
|
||||
<text text-anchor="middle" x="764.65" y="-393.32" font-family="Times,serif" font-size="14.00">time</text>
|
||||
</g>
|
||||
<g id="clust16" class="cluster">
|
||||
<title>cluster_lighting</title>
|
||||
<polygon fill="none" stroke="black" points="674.65,-189.52 674.65,-315.52 804.65,-315.52 804.65,-189.52 674.65,-189.52"/>
|
||||
<text text-anchor="middle" x="739.65" y="-300.32" font-family="Times,serif" font-size="14.00">lighting</text>
|
||||
</g>
|
||||
<g id="clust17" class="cluster">
|
||||
<title>cluster_settings_recipe</title>
|
||||
<polygon fill="none" stroke="black" points="817.65,-332.52 817.65,-408.52 887.65,-408.52 887.65,-332.52 817.65,-332.52"/>
|
||||
<text text-anchor="middle" x="852.65" y="-393.32" font-family="Times,serif" font-size="14.00">recipe</text>
|
||||
</g>
|
||||
<!-- Done -->
|
||||
<g id="node1" class="node">
|
||||
<title>Done</title>
|
||||
<polygon fill="chartreuse" stroke="black" points="1224.71,-1174.42 1224.71,-1210.42 1278.71,-1210.42 1278.71,-1174.42 1224.71,-1174.42"/>
|
||||
<text text-anchor="middle" x="1251.71" y="-1188.72" font-family="Times,serif" font-size="14.00">Done</text>
|
||||
</g>
|
||||
<!-- Documented -->
|
||||
<g id="node2" class="node">
|
||||
<title>Documented</title>
|
||||
<polygon fill="#caff70" stroke="black" points="1294.21,-1160.42 1294.21,-1196.42 1401.21,-1196.42 1401.21,-1160.42 1294.21,-1160.42"/>
|
||||
<text text-anchor="middle" x="1347.71" y="-1174.72" font-family="Times,serif" font-size="14.00">Documented</text>
|
||||
</g>
|
||||
<!-- Undocumented -->
|
||||
<g id="node3" class="node">
|
||||
<title>Undocumented</title>
|
||||
<polygon fill="tomato" stroke="black" points="1203.21,-1111.42 1203.21,-1147.42 1328.21,-1147.42 1328.21,-1111.42 1203.21,-1111.42"/>
|
||||
<text text-anchor="middle" x="1265.71" y="-1125.72" font-family="Times,serif" font-size="14.00">Undocumented</text>
|
||||
</g>
|
||||
<!-- Depend on value -->
|
||||
<g id="node4" class="node">
|
||||
<title>Depend on value</title>
|
||||
<polygon fill="transparent" stroke="black" points="985.86,-974.12 985.86,-1010.12 1121.86,-1010.12 1121.86,-974.12 985.86,-974.12"/>
|
||||
<text text-anchor="middle" x="1053.86" y="-988.42" font-family="Times,serif" font-size="14.00">Depend on value</text>
|
||||
</g>
|
||||
<!-- Node -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node</title>
|
||||
<polygon fill="transparent" stroke="black" points="1165.92,-1036.53 1165.92,-1072.53 1219.92,-1072.53 1219.92,-1036.53 1165.92,-1036.53"/>
|
||||
<text text-anchor="middle" x="1192.92" y="-1050.83" font-family="Times,serif" font-size="14.00">Node</text>
|
||||
</g>
|
||||
<!-- Depend on value->Node -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Depend on value->Node</title>
|
||||
<path fill="none" stroke="blue" d="M1094.08,-1010.17C1113.7,-1018.98 1137.14,-1029.5 1156.27,-1038.08"/>
|
||||
<polygon fill="blue" stroke="blue" points="1155,-1041.35 1165.55,-1042.25 1157.86,-1034.96 1155,-1041.35"/>
|
||||
</g>
|
||||
<!-- Proxy to value -->
|
||||
<g id="node5" class="node">
|
||||
<title>Proxy to value</title>
|
||||
<polygon fill="transparent" stroke="black" points="1021.16,-1042.28 1021.16,-1078.28 1140.16,-1078.28 1140.16,-1042.28 1021.16,-1042.28"/>
|
||||
<text text-anchor="middle" x="1080.66" y="-1056.58" font-family="Times,serif" font-size="14.00">Proxy to value</text>
|
||||
</g>
|
||||
<!-- Proxy to value->Node -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Proxy to value->Node</title>
|
||||
<path fill="none" stroke="deepskyblue" d="M1140.4,-1057.22C1145.55,-1056.96 1150.66,-1056.69 1155.55,-1056.44"/>
|
||||
<polygon fill="deepskyblue" stroke="deepskyblue" points="1156.04,-1059.92 1165.84,-1055.92 1155.68,-1052.93 1156.04,-1059.92"/>
|
||||
</g>
|
||||
<!-- Depend on function -->
|
||||
<g id="node6" class="node">
|
||||
<title>Depend on function</title>
|
||||
<polygon fill="transparent" stroke="black" points="973.25,-1087.28 973.25,-1123.28 1129.25,-1123.28 1129.25,-1087.28 973.25,-1087.28"/>
|
||||
<text text-anchor="middle" x="1051.25" y="-1101.58" font-family="Times,serif" font-size="14.00">Depend on function</text>
|
||||
</g>
|
||||
<!-- Depend on function->Node -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Depend on function->Node</title>
|
||||
<path fill="none" stroke="cornflowerblue" d="M1118.99,-1087.19C1126.99,-1084.64 1135,-1081.89 1142.54,-1079 1147.12,-1077.24 1151.86,-1075.22 1156.5,-1073.12"/>
|
||||
<polygon fill="cornflowerblue" stroke="cornflowerblue" points="1158.28,-1076.15 1165.84,-1068.74 1155.3,-1069.82 1158.28,-1076.15"/>
|
||||
</g>
|
||||
<!-- Proxy to function -->
|
||||
<g id="node7" class="node">
|
||||
<title>Proxy to function</title>
|
||||
<polygon fill="transparent" stroke="black" points="1009.51,-1138.49 1009.51,-1174.49 1149.51,-1174.49 1149.51,-1138.49 1009.51,-1138.49"/>
|
||||
<text text-anchor="middle" x="1079.51" y="-1152.79" font-family="Times,serif" font-size="14.00">Proxy to function</text>
|
||||
</g>
|
||||
<!-- Proxy to function->Node -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Proxy to function->Node</title>
|
||||
<path fill="none" stroke="dodgerblue" d="M1112.45,-1138.39C1119.3,-1134.04 1126.29,-1129.15 1132.37,-1124 1147.44,-1111.25 1162.05,-1094.65 1173.14,-1080.87"/>
|
||||
<polygon fill="dodgerblue" stroke="dodgerblue" points="1176.12,-1082.74 1179.56,-1072.72 1170.62,-1078.41 1176.12,-1082.74"/>
|
||||
</g>
|
||||
<!-- Sleep -->
|
||||
<g id="node9" class="node">
|
||||
<title>Sleep</title>
|
||||
<polygon fill="#caff70" stroke="black" points="594.8,-989.57 594.8,-1025.57 650.8,-1025.57 650.8,-989.57 594.8,-989.57"/>
|
||||
<text text-anchor="middle" x="622.8" y="-1003.87" font-family="Times,serif" font-size="14.00">Sleep</text>
|
||||
</g>
|
||||
<!-- Heat -->
|
||||
<g id="node10" class="node">
|
||||
<title>Heat</title>
|
||||
<polygon fill="#caff70" stroke="black" points="534.8,-939.57 534.8,-975.57 588.8,-975.57 588.8,-939.57 534.8,-939.57"/>
|
||||
<text text-anchor="middle" x="561.8" y="-953.87" font-family="Times,serif" font-size="14.00">Heat</text>
|
||||
</g>
|
||||
<!-- All Kill -->
|
||||
<g id="node11" class="node">
|
||||
<title>All Kill</title>
|
||||
<polygon fill="#caff70" stroke="black" points="116.22,-496.25 116.22,-532.25 180.22,-532.25 180.22,-496.25 116.22,-496.25"/>
|
||||
<text text-anchor="middle" x="148.22" y="-510.55" font-family="Times,serif" font-size="14.00">All Kill</text>
|
||||
</g>
|
||||
<!-- Lighting Kill -->
|
||||
<g id="node13" class="node">
|
||||
<title>Lighting Kill</title>
|
||||
<polygon fill="#caff70" stroke="black" points="415.65,-775.73 415.65,-811.73 520.65,-811.73 520.65,-775.73 415.65,-775.73"/>
|
||||
<text text-anchor="middle" x="468.15" y="-790.03" font-family="Times,serif" font-size="14.00">Lighting Kill</text>
|
||||
</g>
|
||||
<!-- All Kill->Lighting Kill -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>All Kill->Lighting Kill</title>
|
||||
<path fill="none" stroke="dodgerblue" d="M158.4,-532.52C170.01,-553.21 187.69,-584.31 190.17,-586.12 223.58,-610.58 243,-590.26 281.06,-606.58 363.73,-642.04 397.51,-645.49 449.35,-719.01 458.9,-732.56 463.61,-750.5 465.93,-765.4"/>
|
||||
<polygon fill="dodgerblue" stroke="dodgerblue" points="462.49,-766.13 467.23,-775.61 469.44,-765.25 462.49,-766.13"/>
|
||||
</g>
|
||||
<!-- Temperature Kill -->
|
||||
<g id="node16" class="node">
|
||||
<title>Temperature Kill</title>
|
||||
<polygon fill="#caff70" stroke="black" points="192.91,-549.4 192.91,-585.4 329.91,-585.4 329.91,-549.4 192.91,-549.4"/>
|
||||
<text text-anchor="middle" x="261.41" y="-563.7" font-family="Times,serif" font-size="14.00">Temperature Kill</text>
|
||||
</g>
|
||||
<!-- All Kill->Temperature Kill -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>All Kill->Temperature Kill</title>
|
||||
<path fill="none" stroke="dodgerblue" d="M180.35,-529.34C190.67,-534.18 202.32,-539.66 213.52,-544.91"/>
|
||||
<polygon fill="dodgerblue" stroke="dodgerblue" points="212.23,-548.18 222.77,-549.26 215.2,-541.84 212.23,-548.18"/>
|
||||
</g>
|
||||
<!-- Lighting Change -->
|
||||
<g id="node12" class="node">
|
||||
<title>Lighting Change</title>
|
||||
<polygon fill="#caff70" stroke="black" points="311.65,-719.73 311.65,-755.73 446.65,-755.73 446.65,-719.73 311.65,-719.73"/>
|
||||
<text text-anchor="middle" x="379.15" y="-734.03" font-family="Times,serif" font-size="14.00">Lighting Change</text>
|
||||
</g>
|
||||
<!-- Temperature Change -->
|
||||
<g id="node14" class="node">
|
||||
<title>Temperature Change</title>
|
||||
<polygon fill="#caff70" stroke="black" points="110.72,-607.3 110.72,-643.3 277.72,-643.3 277.72,-607.3 110.72,-607.3"/>
|
||||
<text text-anchor="middle" x="194.22" y="-621.6" font-family="Times,serif" font-size="14.00">Temperature Change</text>
|
||||
</g>
|
||||
<!-- Temperature Change->Sleep -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Temperature Change->Sleep</title>
|
||||
<path fill="none" stroke="cornflowerblue" d="M206.75,-643.61C247.16,-701.29 380.34,-880.98 533.72,-976.29 549.28,-985.96 568.24,-993.15 584.66,-998.18"/>
|
||||
<polygon fill="cornflowerblue" stroke="cornflowerblue" points="583.93,-1001.61 594.51,-1001.04 585.88,-994.89 583.93,-1001.61"/>
|
||||
</g>
|
||||
<!-- Temperature Change->Heat -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Temperature Change->Heat</title>
|
||||
<path fill="none" stroke="cornflowerblue" d="M208.48,-643.61C229.29,-669.84 269.77,-719.06 308.95,-756.45 382.22,-826.37 477.91,-897.7 527.95,-933.68"/>
|
||||
<polygon fill="cornflowerblue" stroke="cornflowerblue" points="526,-936.59 536.17,-939.56 530.07,-930.89 526,-936.59"/>
|
||||
</g>
|
||||
<!-- Temperature -->
|
||||
<g id="node17" class="node">
|
||||
<title>Temperature</title>
|
||||
<polygon fill="tomato" stroke="black" points="898.26,-746.32 898.26,-782.32 1007.26,-782.32 1007.26,-746.32 898.26,-746.32"/>
|
||||
<text text-anchor="middle" x="952.76" y="-760.62" font-family="Times,serif" font-size="14.00">Temperature</text>
|
||||
</g>
|
||||
<!-- Temperature Change->Temperature -->
|
||||
<g id="edge12" class="edge">
|
||||
<title>Temperature Change->Temperature</title>
|
||||
<path fill="none" stroke="blue" d="M277.93,-640.64C430.54,-668.61 750.9,-727.32 888.13,-752.47"/>
|
||||
<polygon fill="blue" stroke="blue" points="887.61,-755.94 898.08,-754.3 888.88,-749.05 887.61,-755.94"/>
|
||||
</g>
|
||||
<!-- Temperature Hold -->
|
||||
<g id="node15" class="node">
|
||||
<title>Temperature Hold</title>
|
||||
<polygon fill="#caff70" stroke="black" points="24.05,-562.29 24.05,-598.29 171.05,-598.29 171.05,-562.29 24.05,-562.29"/>
|
||||
<text text-anchor="middle" x="97.55" y="-576.59" font-family="Times,serif" font-size="14.00">Temperature Hold</text>
|
||||
</g>
|
||||
<!-- Temperature Hold->Sleep -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>Temperature Hold->Sleep</title>
|
||||
<path fill="none" stroke="cornflowerblue" d="M96.87,-598.51C97.15,-611.95 99.27,-630.21 107.38,-644.02 229.01,-851.19 322.88,-861.15 533.72,-976.29 549.68,-985.01 568.55,-992.05 584.79,-997.22"/>
|
||||
<polygon fill="cornflowerblue" stroke="cornflowerblue" points="583.94,-1000.62 594.52,-1000.2 585.99,-993.93 583.94,-1000.62"/>
|
||||
</g>
|
||||
<!-- Temperature Hold->Heat -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>Temperature Hold->Heat</title>
|
||||
<path fill="none" stroke="cornflowerblue" d="M96.63,-598.37C96.78,-611.9 98.81,-630.36 107.38,-644.02 210.91,-809.19 436.74,-909.82 525.21,-944.21"/>
|
||||
<polygon fill="cornflowerblue" stroke="cornflowerblue" points="523.98,-947.48 534.57,-947.8 526.49,-940.95 523.98,-947.48"/>
|
||||
</g>
|
||||
<!-- Temperature Hold->Temperature -->
|
||||
<g id="edge13" class="edge">
|
||||
<title>Temperature Hold->Temperature</title>
|
||||
<path fill="none" stroke="blue" d="M171.46,-589.36C205.02,-593.87 245.16,-599.81 281.06,-606.58 506.04,-649.02 769.49,-716.01 888.56,-747.24"/>
|
||||
<polygon fill="blue" stroke="blue" points="887.7,-750.63 898.26,-749.79 889.48,-743.86 887.7,-750.63"/>
|
||||
</g>
|
||||
<!-- Temperature Kill->Heat -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>Temperature Kill->Heat</title>
|
||||
<path fill="none" stroke="dodgerblue" d="M271.91,-585.67C275.24,-592.11 278.68,-599.51 281.06,-606.58 302.65,-670.8 274.03,-698.39 308.95,-756.45 362.21,-845.01 469.78,-910.27 525.89,-939.9"/>
|
||||
<polygon fill="dodgerblue" stroke="dodgerblue" points="524.28,-943.01 534.77,-944.51 527.51,-936.79 524.28,-943.01"/>
|
||||
</g>
|
||||
<!-- /api/sensor/temperature -->
|
||||
<g id="node18" class="node">
|
||||
<title>/api/sensor/temperature</title>
|
||||
<polygon fill="#caff70" stroke="black" points="625.18,-77.93 625.18,-113.93 732.18,-113.93 732.18,-77.93 625.18,-77.93"/>
|
||||
<text text-anchor="middle" x="678.68" y="-92.23" font-family="Times,serif" font-size="14.00">temperature</text>
|
||||
</g>
|
||||
<!-- /api/sensor/temperature->Temperature -->
|
||||
<g id="edge15" class="edge">
|
||||
<title>/api/sensor/temperature->Temperature</title>
|
||||
<path fill="none" stroke="deepskyblue" d="M697.71,-114.05C724.46,-140.67 772.72,-193.09 797.97,-247.44 822.91,-301.11 809.52,-320.7 824.81,-377.88 861.31,-514.34 918.81,-673.28 942.27,-736.42"/>
|
||||
<polygon fill="deepskyblue" stroke="deepskyblue" points="939.09,-737.9 945.86,-746.05 945.65,-735.46 939.09,-737.9"/>
|
||||
</g>
|
||||
<!-- /api/recipe/list -->
|
||||
<g id="node19" class="node">
|
||||
<title>/api/recipe/list</title>
|
||||
<polygon fill="#caff70" stroke="black" points="547.05,-71.08 547.05,-107.08 601.05,-107.08 601.05,-71.08 547.05,-71.08"/>
|
||||
<text text-anchor="middle" x="574.05" y="-85.38" font-family="Times,serif" font-size="14.00">list</text>
|
||||
</g>
|
||||
<!-- /api/recipe/start -->
|
||||
<g id="node20" class="node">
|
||||
<title>/api/recipe/start</title>
|
||||
<polygon fill="#caff70" stroke="black" points="547.05,-125.08 547.05,-161.08 601.05,-161.08 601.05,-125.08 547.05,-125.08"/>
|
||||
<text text-anchor="middle" x="574.05" y="-139.38" font-family="Times,serif" font-size="14.00">start</text>
|
||||
</g>
|
||||
<!-- /api/recipe/kill -->
|
||||
<g id="node21" class="node">
|
||||
<title>/api/recipe/kill</title>
|
||||
<polygon fill="#caff70" stroke="black" points="546.48,-17.31 546.48,-53.31 600.48,-53.31 600.48,-17.31 546.48,-17.31"/>
|
||||
<text text-anchor="middle" x="573.48" y="-31.61" font-family="Times,serif" font-size="14.00">kill</text>
|
||||
</g>
|
||||
<!-- /api/recipe/kill->All Kill -->
|
||||
<g id="edge14" class="edge">
|
||||
<title>/api/recipe/kill->All Kill</title>
|
||||
<path fill="none" stroke="dodgerblue" d="M557.72,-53.6C553.61,-58.82 549.39,-64.65 545.97,-70.36 527.41,-101.41 533.67,-115 513.37,-144.94 412.46,-293.74 247.22,-434.79 179.08,-489.89"/>
|
||||
<polygon fill="dodgerblue" stroke="dodgerblue" points="176.86,-487.19 171.26,-496.18 181.25,-492.64 176.86,-487.19"/>
|
||||
</g>
|
||||
<!-- /api/recipe/schedule/add -->
|
||||
<g id="node22" class="node">
|
||||
<title>/api/recipe/schedule/add</title>
|
||||
<polygon fill="#caff70" stroke="black" points="458.29,-108.22 458.29,-144.22 512.29,-144.22 512.29,-108.22 458.29,-108.22"/>
|
||||
<text text-anchor="middle" x="485.29" y="-122.52" font-family="Times,serif" font-size="14.00">add</text>
|
||||
</g>
|
||||
<!-- /api/recipe/schedule/delete -->
|
||||
<g id="node23" class="node">
|
||||
<title>/api/recipe/schedule/delete</title>
|
||||
<polygon fill="#caff70" stroke="black" points="392.79,-58.22 392.79,-94.22 453.79,-94.22 453.79,-58.22 392.79,-58.22"/>
|
||||
<text text-anchor="middle" x="423.29" y="-72.52" font-family="Times,serif" font-size="14.00">delete</text>
|
||||
</g>
|
||||
<!-- /api/recipe/schedule/list -->
|
||||
<g id="node24" class="node">
|
||||
<title>/api/recipe/schedule/list</title>
|
||||
<polygon fill="#caff70" stroke="black" points="463.29,-43.22 463.29,-79.22 517.29,-79.22 517.29,-43.22 463.29,-43.22"/>
|
||||
<text text-anchor="middle" x="490.29" y="-57.52" font-family="Times,serif" font-size="14.00">list</text>
|
||||
</g>
|
||||
<!-- /api/settings/time/set -->
|
||||
<g id="node25" class="node">
|
||||
<title>/api/settings/time/set</title>
|
||||
<polygon fill="#caff70" stroke="black" points="737.89,-341.16 737.89,-377.16 791.89,-377.16 791.89,-341.16 737.89,-341.16"/>
|
||||
<text text-anchor="middle" x="764.89" y="-355.46" font-family="Times,serif" font-size="14.00">set</text>
|
||||
</g>
|
||||
<!-- /api/settings/lighting/list -->
|
||||
<g id="node26" class="node">
|
||||
<title>/api/settings/lighting/list</title>
|
||||
<polygon fill="#caff70" stroke="black" points="682.89,-198.16 682.89,-234.16 736.89,-234.16 736.89,-198.16 682.89,-198.16"/>
|
||||
<text text-anchor="middle" x="709.89" y="-212.46" font-family="Times,serif" font-size="14.00">list</text>
|
||||
</g>
|
||||
<!-- /api/settings/lighting/set -->
|
||||
<g id="node27" class="node">
|
||||
<title>/api/settings/lighting/set</title>
|
||||
<polygon fill="#caff70" stroke="black" points="742.89,-248.16 742.89,-284.16 796.89,-284.16 796.89,-248.16 742.89,-248.16"/>
|
||||
<text text-anchor="middle" x="769.89" y="-262.46" font-family="Times,serif" font-size="14.00">set</text>
|
||||
</g>
|
||||
<!-- /api/settings/recipe/set -->
|
||||
<g id="node28" class="node">
|
||||
<title>/api/settings/recipe/set</title>
|
||||
<polygon fill="#caff70" stroke="black" points="825.89,-341.16 825.89,-377.16 879.89,-377.16 879.89,-341.16 825.89,-341.16"/>
|
||||
<text text-anchor="middle" x="852.89" y="-355.46" font-family="Times,serif" font-size="14.00">set</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 20 KiB |
0
content/posts/smart-rice-cooker/media/src/.env
Normal file
0
content/posts/smart-rice-cooker/media/src/.env
Normal file
22
content/posts/smart-rice-cooker/media/src/rice_build.sh
Executable file
22
content/posts/smart-rice-cooker/media/src/rice_build.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "${1}" == '-d' ]; then
|
||||
echo 'src/rice_connections.dot'
|
||||
exit
|
||||
fi
|
||||
|
||||
__target='connections.svg'
|
||||
|
||||
if [ "${1}" == '-t' ]; then
|
||||
echo "${__target}"
|
||||
exit
|
||||
fi
|
||||
|
||||
sed -e 's/\[depend_value\]/[color=blue]/' \
|
||||
-e 's/\[proxy_value\]/\[color=deepskyblue\]/' \
|
||||
-e 's/\[proxy_function\]/\[color=dodgerblue\]/' \
|
||||
-e 's/\[documented\]/\[fillcolor=darkolivegreen1\]/' \
|
||||
-e 's/\[done\]/\[fillcolor=chartreuse\]/' \
|
||||
-e 's/\[depend_function\]/\[color=cornflowerblue\]/' 'src/rice_connections.dot' | fdp -Ln5 -Tsvg >"${__target}"
|
||||
|
||||
exit
|
||||
|
|
@ -0,0 +1 @@
|
|||
8c980661e6c1b89a78f54e068a10dd93
|
||||
|
|
@ -176,5 +176,4 @@ digraph {
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -50,18 +50,22 @@ __PROCESS_PNG=true
|
|||
__depends__PROCESS_PNG=(PNG_OPTIMIZE PNG_RESCALE)
|
||||
__PNG_OPTIMIZE=false
|
||||
__depends__PNG_OPTIMIZE=(PNG_EFFORT)
|
||||
__PNG_EFFORT=9
|
||||
# quick/default/more/placebo
|
||||
__PNG_EFFORT='quick'
|
||||
__PNG_RESCALE=true
|
||||
__depends__PNG_RESCALE=(PNG_SCALE)
|
||||
__depends__PNG_RESCALE=(PNG_SCALE PNG_QUALITY)
|
||||
__PNG_SCALE="${__global_scale}"
|
||||
__PNG_QUALITY=0
|
||||
|
||||
__ENVIRONMENT_LIST='JPEG_QUALITY
|
||||
__ENVIRONMENT_LIST='PROCESS_JPEG
|
||||
PROCESS_PNG
|
||||
PROCESS_SCRIPT
|
||||
JPEG_QUALITY
|
||||
JPEG_RESCALE
|
||||
JPEG_SCALE
|
||||
JPEG_OPTIMIZE
|
||||
PROCESS_JPEG
|
||||
PROCESS_PNG
|
||||
PNG_OPTIMIZE
|
||||
PNG_QUALITY
|
||||
PNG_EFFORT
|
||||
PNG_RESCALE
|
||||
PNG_SCALE'
|
||||
|
|
@ -70,11 +74,11 @@ PNG_SCALE'
|
|||
# Functions
|
||||
###############################################################################
|
||||
|
||||
__fatal_error_handler(){
|
||||
if [ "${__fatal_error}" == 'true' ]; then
|
||||
__fatal_error_handler() {
|
||||
if [ "${__fatal_error}" == 'true' ]; then
|
||||
echo 'Fatal Error: Exiting'
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
########################################
|
||||
|
|
@ -212,6 +216,17 @@ __clear_env() {
|
|||
|
||||
}
|
||||
|
||||
__unset_unused() {
|
||||
while read -r __var; do
|
||||
#local "${__var}"
|
||||
if [ "${__var}" != "__PROCESS_${1^^}" ]; then
|
||||
eval "${__var#__}"='false'
|
||||
fi
|
||||
done < <(set | grep -E '^__PROCESS_' | sed 's/^\([^=]*\)=.*/\1/')
|
||||
|
||||
__resolve_env
|
||||
}
|
||||
|
||||
########################################
|
||||
# __process <.env>
|
||||
########################################
|
||||
|
|
@ -224,6 +239,8 @@ __clear_env() {
|
|||
|
||||
__process() {
|
||||
|
||||
__process_scripts
|
||||
|
||||
if [ "${PROCESS_JPEG}" == 'true' ]; then
|
||||
__process_generic_image jpeg
|
||||
fi
|
||||
|
|
@ -244,14 +261,7 @@ __find_png() {
|
|||
|
||||
__process_generic_image() {
|
||||
|
||||
while read -r __var; do
|
||||
#local "${__var}"
|
||||
if [ "${__var}" != "__PROCESS_${1^^}" ]; then
|
||||
eval "${__var#__}"='false'
|
||||
fi
|
||||
done < <(set | grep -E '^__PROCESS_' | sed 's/^\([^=]*\)=.*/\1/')
|
||||
|
||||
__resolve_env
|
||||
__unset_unused "${1}"
|
||||
|
||||
"__find_${1}" | while read -r __source_file; do
|
||||
|
||||
|
|
@ -305,6 +315,69 @@ __optimize_jpeg() {
|
|||
jpegoptim -s "${1}" 1>/dev/null
|
||||
}
|
||||
|
||||
__rescale_png() {
|
||||
convert "${1}" -quality "${PNG_QUALITY}" -auto-orient -resize "${PNG_SCALE}"% "${2}"
|
||||
}
|
||||
|
||||
__optimize_png() {
|
||||
|
||||
local __options=''
|
||||
|
||||
case $variable-name in
|
||||
'quick')
|
||||
__options='-q'
|
||||
;;
|
||||
'default')
|
||||
__options=''
|
||||
;;
|
||||
'more')
|
||||
__options='-m'
|
||||
;;
|
||||
'placebo')
|
||||
__options='--iterations=500 --filters=01234mepb --lossy_8bit --lossy_transparent'
|
||||
;;
|
||||
*)
|
||||
echo "Unknown PNG_EFFORT option '${PNG_EFFORT}', defaulting to 'quick'"
|
||||
__options='-q'
|
||||
;;
|
||||
esac
|
||||
|
||||
zopflipng -y ${__options} "${1}" "${1}"
|
||||
}
|
||||
|
||||
__process_scripts() {
|
||||
|
||||
__unset_unused SCRIPT
|
||||
|
||||
find './src/' -type f \( -iname \*.sh \) | while read -r __source_file; do
|
||||
|
||||
export FILE_HASH="$(
|
||||
{
|
||||
md5sum "${__source_file}"
|
||||
"${__source_file}" -d | sort | while read -r __file; do
|
||||
md5sum "${__file}"
|
||||
done
|
||||
} | sort | md5sum -
|
||||
)"
|
||||
|
||||
if ! __check_file "${__source_file}" "$("${__source_file}" -t)"; then
|
||||
|
||||
echo "Running: ${__source_file}"
|
||||
|
||||
echo "$(__hash_env)" >"$(__get_hash_file "${__source_file}")"
|
||||
|
||||
"${__source_file}"
|
||||
|
||||
fi
|
||||
|
||||
unset FILE_HASH
|
||||
|
||||
done
|
||||
|
||||
__set_env './src/.env'
|
||||
|
||||
}
|
||||
|
||||
########################################
|
||||
# __get_hash_file <file>
|
||||
########################################
|
||||
|
|
@ -319,7 +392,7 @@ __get_hash_file() {
|
|||
}
|
||||
|
||||
########################################
|
||||
# __check_file <file>
|
||||
# __check_file <source> [<target> ...]
|
||||
########################################
|
||||
#
|
||||
# Check File
|
||||
|
|
@ -331,12 +404,35 @@ __check_file() {
|
|||
|
||||
__hash_file="$(__get_hash_file "${1}")"
|
||||
|
||||
__target="$(sed 's|^\./src/|./|' <<<"${1}")"
|
||||
shift
|
||||
|
||||
__targets=''
|
||||
|
||||
if [ "${#}" == '0' ]; then
|
||||
|
||||
__targets="$(sed 's|^\./src/|./|' <<<"${1}")"
|
||||
|
||||
else
|
||||
|
||||
until [ "${#}" == '0' ]; do
|
||||
|
||||
__targets="${__target}
|
||||
${1}"
|
||||
|
||||
shift
|
||||
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
while read -r __target; do
|
||||
|
||||
if ! [ -e "${__target}" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
if [ -e "${__hash_file}" ]; then
|
||||
__file_hash="$(cat "${__hash_file}")"
|
||||
if [ "${__file_hash}" == "$(__hash_env)" ]; then
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
__target='./static/images/generated/rice/connections.svg'
|
||||
|
||||
mkdir -p "$(dirname "${__target}")"
|
||||
|
||||
sed -e 's/\[depend_value\]/[color=blue]/' \
|
||||
-e 's/\[proxy_value\]/\[color=deepskyblue\]/' \
|
||||
-e 's/\[proxy_function\]/\[color=dodgerblue\]/' \
|
||||
-e 's/\[documented\]/\[fillcolor=darkolivegreen1\]/' \
|
||||
-e 's/\[done\]/\[fillcolor=chartreuse\]/' \
|
||||
-e 's/\[depend_function\]/\[color=cornflowerblue\]/' 'src/rice_connections.dot' | fdp -Ln5 -Tsvg > "${__target}"
|
||||
|
||||
exit
|
||||
Loading…
Add table
Reference in a new issue