From 2134b456150212808274fa0ec98c56d69c08d51a Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 14 Apr 2023 15:56:18 +0200 Subject: Add layout generation script to Makefile. --- tools/genlayout.py | 3 + tools/layout.svg | 1984 +++++++++++++++++++++++++++++++++------------------ tools/makelayout.js | 94 +++ 3 files changed, 1370 insertions(+), 711 deletions(-) create mode 100644 tools/makelayout.js (limited to 'tools') diff --git a/tools/genlayout.py b/tools/genlayout.py index f6003bd..b113e8e 100644 --- a/tools/genlayout.py +++ b/tools/genlayout.py @@ -25,6 +25,9 @@ def readsvg(filename): mode = 'circle' x = y = w = h = 0 name = None + elif line == " + id="metadata334"> @@ -27,7 +26,7 @@ + id="defs332" /> - - + id="namedview330" + showgrid="false" + inkscape:zoom="1.0464316" + inkscape:cx="932.7326" + inkscape:cy="650.77941" + inkscape:current-layer="svg328" + inkscape:document-rotation="0" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + image-rendering="pixelated" + sodipodi:insensitive="true" + id="image2" /> + Atlantico + + + + + inkscape:label="Atlantico DRUGS" + x="667" + y="545" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect14" /> + Choco + + + + + inkscape:label="Choco DRUGS" + x="410.02856" + y="929.33215" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect26" /> + Narino + + + + + inkscape:label="Narino DRUGS" + x="227.59502" + y="1440.8683" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect38" /> + Meta West + + + + + inkscape:label="Meta West DRUGS" + x="717.08447" + y="1452.4297" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect50" /> + Guaviare + + + + + inkscape:label="Guaviare DRUGS" + x="923.38812" + y="1556.0155" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect62" /> + Putumayo + + + + + inkscape:label="Putumayo DRUGS" + x="592.4621" + y="1687.1282" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect74" /> + Cesar + + + + + inkscape:label="Cesar DRUGS" + x="1007.8267" + y="270.09128" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect86" /> + Antioquia + + + + + inkscape:label="Antioquia DRUGS" + x="547.55762" + y="1110.0782" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect98" /> + Santander + + + + + inkscape:label="Santander DRUGS" + x="833.58704" + y="1060.5879" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect110" /> + Huila + + + + + inkscape:label="Huila DRUGS" + x="337.48947" + y="1737.989" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect122" /> + Arauca + + + + + inkscape:label="Arauca DRUGS" + x="1026.655" + y="1004.5025" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect134" /> + Meta East + + + + + inkscape:label="Meta East DRUGS" + x="1009.0693" + y="1298.2498" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect146" /> + Vichada + + + + + inkscape:label="Vichada DRUGS" + x="1269.3851" + y="1154.1056" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect158" /> + Guainia + + + + + inkscape:label="Guainia DRUGS" + x="1366.6522" + y="1599.6589" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect170" /> + Vaupes + + + + + inkscape:label="Vaupes DRUGS" + x="1213.3019" + y="1772.5411" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect182" /> + Amazonas + + + + + inkscape:label="Amazonas DRUGS" + x="1030.8683" + y="1940.4235" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect194" /> + Ecuador + + + + + inkscape:label="Ecuador DRUGS" + x="212.03867" + y="1860.8184" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect206" /> + Panama + + + + + inkscape:label="Panama DRUGS" + x="155.47014" + y="878.97614" + width="92" + height="56" + fill="#ffffff" + fill-opacity="0.5" + stroke="#000000" + id="rect218" /> + Sincelejo / Ayacucho + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle222" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle224" /> + Bucaramanga / Ayacucho + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle228" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle230" /> + Cucuta / Ayacucho + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle234" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle236" /> + Santa Marta / Ayacucho + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle240" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle242" /> + Bogota / Yopal + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle246" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle248" /> + Bogota / Neiva + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle252" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle254" /> + Bogota / San Jose + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle258" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle260" /> + Bucaramanga / Ibague / Bogota + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle264" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle266" /> + Cucuta / Arauca + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle270" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle272" /> + Neiva / Pasto + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle276" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle278" /> + Pasto / Tumaco + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle282" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle284" /> + Cali / Pasto + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle288" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle290" /> + Cali / Buenaventura + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle294" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle296" /> + Ibague / Cali + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle300" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle302" /> + Medellin / Ibague + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle306" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle308" /> + Cartagena / Sincelejo + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle312" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle314" /> + Sincelejo / Medellin + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle318" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle320" /> + Santa Marta / Cartagena + fill="#00ffff" + fill-opacity="0.5" + stroke="#000000" + id="circle324" /> + fill="#ff0000" + fill-opacity="0.5" + stroke="#000000" + id="circle326" /> diff --git a/tools/makelayout.js b/tools/makelayout.js new file mode 100644 index 0000000..ee0b36c --- /dev/null +++ b/tools/makelayout.js @@ -0,0 +1,94 @@ +const DEPTS = [ + "Atlantico", + "Choco", + "Narino", + "Meta West", + "Guaviare", + "Putumayo", + "Cesar", + "Antioquia", + "Santander", + "Huila", + "Arauca", + "Meta East", + "Vichada", + "Guainia", + "Vaupes", + "Amazonas", + "Ecuador", + "Panama", +] + +const LOCS = [ + "Sincelejo / Ayacucho", + "Bucaramanga / Ayacucho", + "Cucuta / Ayacucho", + "Santa Marta / Ayacucho", + "Bogota / Yopal", + "Bogota / Neiva", + "Bogota / San Jose", + "Bucaramanga / Ibague / Bogota", + "Cucuta / Arauca", + "Neiva / Pasto", + "Pasto / Tumaco", + "Cali / Pasto", + "Cali / Buenaventura", + "Ibague / Cali", + "Medellin / Ibague", + "Cartagena / Sincelejo", + "Sincelejo / Medellin", + "Santa Marta / Cartagena", +] + +const print = console.log + +print('') +print('') +print('') + +const COLORS = { + Govt: "cyan", + AUC: "yellow", + FARC: "red", + Cartels: "limegreen", +} + +let x = -700, y = 100 + +function advancex() { + x += 150 +} + +function advancey() { + x -= 150 * 4 + y += 100 +} + +for (let s of DEPTS) { + // faction holdings - 100x80 ellipse + print(`${s}`) + for (let f of [ "Govt", "AUC", "Cartels", "FARC" ]) { + print(``) + advancex() + } + // shipment holding box - 92x56 rect + print(``) + advancey() +} + +x = 1700 +y = 100 + +for (let s of LOCS) { + print(`${s}`) + print(``) + print(``) + y += 100 +} + +print('') -- cgit v1.2.3