config created

This commit is contained in:
Malte Münch 2020-01-30 01:53:33 +01:00
parent af538f0f2a
commit 898049b92b
4 changed files with 147 additions and 5 deletions

127
conf.yml Normal file
View File

@ -0,0 +1,127 @@
led0:
- https://www.devtal.de/api/
led1:
- https://www.binary-kitchen.de/spaceapi.php
led2:
- https://status.aachen.ccc.de/spaceapi
led3:
- https://schalter.ccchb.de/spaceapi.json
led4:
- https://api.koeln.ccc.de
led5:
- https://www.ccc-mannheim.de/spaceapi/spaceapi.json
led6:
- http://cccfr.de/status/spaceapi.py
led7:
- http://chaos-consulting.de/api/space.api
led8:
- https://status.chaospott.de/status.json
led9:
- https://chaoschemnitz.de/chch.json
led10:
- https://www.ccc-p.org/spaceapi.json
led11:
- http://doorstatus.c3re.de/status/json
led12:
- http://status.ctdo.de/api/spaceapi/v13
led13:
- https://status.diyww.de/status.json
led14:
- http://club.entropia.de/spaceapi
led15:
- https://fablab.fau.de/spaceapi/
led16:
- https://spaceapi.futev.de/spaceapi.json
led17:
- https://freieslabor.org/api/info
led18:
- https://hackerspace-bielefeld.de/spacestatus/status.json
led19:
- https://hacklabor.de/api/space/v1/
led20:
- http://spaceapi.hacksaar.de/status.json
led21:
- https://status.hasi.it/spaceapi
led22:
- https://status.kraut.space/api
led23:
- http://status.leinelab.org/api/spaceapi.json
led24:
- http://status.mainframe.io/api/spaceInfo
led25:
- http://spaceapi.n39.eu/json
led26:
- http://netzladen.org/api/status.json
led27:
- https://api.nerd2nerd.org/status.json
led28:
- https://cccgoe.de/spaceapi.php
led29:
- http://api.openlab-augsburg.de/data.json
led30:
- https://werkraum.freiraumzittau.de/spaceapi/13/
led31:
- https://spaceapi.reaktor23.org
led32:
- http://status.stratum0.org/status.json
led33:
- https://api.warpzone.ms/spaceapi
led34:
- https://hsmr.cc/spaceapi.json
led35:
- https://status.bckspc.de/spacestatus.php
led36:
- http://stats.bytewerk.org/status.json
led37:
- https://api.flipdot.org/
led38:
- https://spaceapi.hackzogtum-coburg.de
led39:
- https://state.maglab.space/spaceapi.json
led40:
- http://nobreakspace.org/status/spaceapi.json
led41:
- https://bodensee.space/spaceapi/see-base.json
led42:
- https://api.shackspace.de/v1/spaceapi
led43:
- https://verschwoerhaus.de/feed/spaceapi
led44:
- https://vspace.one/spaceapi.json
led45:
- https://keinanschluss.un-hack-bar.de/spaceapi.json
led46:
- https://www.hackerspace-sw.de/spaceapi.json
led47:
- https://hamburg.ccc.de/dooris/status.json
- http://blog.attraktor.org/spaceapi/spaceapi.json
led48:
- https://status.makerspace-erfurt.de/status.json
- http://status.bytespeicher.org/status.json
led49:
- http://status.munichmakerlab.de/spaceapi.php
- http://api.muc.ccc.de/spaceapi.json
led50:
- http://api.terminal21.de
- http://api.terminal21.de/status_ebk.json
led51:
- https://fnord.istsystemrelevant.de/spaceapi.json
- https://chaosdorf.de/space_api.json
led52:
- http://spaceapi.nordlab-ev.de
- https://api.chaostreff-flensburg.de/
led53:
- http://www.space-left.org/spaceapi13.json
- https://das-labor.org/status/api
led54:
- http://www.turmlabor.de/spaces.api
- https://www.c3d2.de/spaceapi.json
led55:
- http://spaceapi.k4cg.org/spaceapi.json
- http://api.fablab-nuernberg.de/spaceapi.php
- https://status.nerdberg.de/api/space
led56:
- https://x-hain.de/spaceapi-0.13.json
- http://www.c-base.org/status.json
- https://spaceapi.motionlab.berlin/
- https://spaceapi.afra-berlin.de/v1/status.json

2
dots.svg Normal file
View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" ?>
<svg baseProfile="tiny" height="100%" version="1.2" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink"><defs /><image height="793" width="586" xlink:href="Karte_Deutschland.svg" /><circle cx="81.7454" cy="385.5972" fill="green" r="5" /><circle cx="399.6935" cy="615.6688" fill="green" r="5" /><circle cx="15.4138" cy="434.7136" fill="green" r="5" /><circle cx="188.5045" cy="200.6481" fill="green" r="5" /><circle cx="66.887" cy="417.8685" fill="green" r="5" /><circle cx="167.6143" cy="569.4094" fill="green" r="5" /><circle cx="126.1819" cy="719.2963" fill="green" r="5" /><circle cx="117.0741" cy="374.6569" fill="green" r="5" /><circle cx="74.0485" cy="368.1206" fill="green" r="5" /><circle cx="452.1493" cy="430.075" fill="green" r="5" /><circle cx="461.0364" cy="271.191" fill="green" r="5" /><circle cx="83.2553" cy="349.174" fill="green" r="5" /><circle cx="102.1736" cy="359.0351" fill="green" r="5" /><circle cx="142.1956" cy="146.0649" fill="green" r="5" /><circle cx="162.4246" cy="615.9902" fill="green" r="5" /><circle cx="330.0778" cy="558.1656" fill="green" r="5" /><circle cx="93.7394" cy="261.3536" fill="green" r="5" /><circle cx="260.8594" cy="293.6969" fill="green" r="5" /><circle cx="170.455" cy="306.9886" fill="green" r="5" /><circle cx="354.9008" cy="147.6856" fill="green" r="5" /><circle cx="70.7771" cy="592.1661" fill="green" r="5" /><circle cx="136.6748" cy="426.1629" fill="green" r="5" /><circle cx="365.404" cy="420.0308" fill="green" r="5" /><circle cx="246.3261" cy="273.0196" fill="green" r="5" /><circle cx="150.4345" cy="194.2755" fill="green" r="5" /><circle cx="368.3957" cy="298.698" fill="green" r="5" /><circle cx="78.6237" cy="439.3528" fill="green" r="5" /><circle cx="259.317" cy="534.9455" fill="green" r="5" /><circle cx="260.7333" cy="357.229" fill="green" r="5" /><circle cx="320.9232" cy="682.1413" fill="green" r="5" /><circle cx="571.3649" cy="423.262" fill="green" r="5" /><circle cx="153.1834" cy="756.3874" fill="green" r="5" /><circle cx="297.5468" cy="282.4907" fill="green" r="5" /><circle cx="113.2472" cy="316.6318" fill="green" r="5" /><circle cx="186.1462" cy="431.5539" fill="green" r="5" /><circle cx="321.3031" cy="524.7402" fill="green" r="5" /><circle cx="352.5687" cy="640.0333" fill="green" r="5" /><circle cx="231.2983" cy="380.3748" fill="green" r="5" /><circle cx="325.0073" cy="487.3747" fill="green" r="5" /><circle cx="243.6192" cy="457.7786" fill="green" r="5" /><circle cx="307.1407" cy="120.399" fill="green" r="5" /><circle cx="213.089" cy="741.7894" fill="green" r="5" /><circle cx="215.3923" cy="639.4033" fill="green" r="5" /><circle cx="263.6082" cy="678.1875" fill="green" r="5" /><circle cx="165.5607" cy="711.9769" fill="green" r="5" /><circle cx="116.6707" cy="358.2055" fill="green" r="5" /><circle cx="284.0925" cy="509.1953" fill="green" r="5" /><circle cx="260.7567" cy="152.476" fill="green" r="5" /><circle cx="330.6063" cy="415.0586" fill="green" r="5" /><circle cx="363.6081" cy="702.68" fill="green" r="5" /><circle cx="391.5893" cy="363.8922" fill="green" r="5" /><circle cx="55.705" cy="392.2859" fill="green" r="5" /><circle cx="227.9788" cy="25.6804" fill="green" r="5" /><circle cx="85.7918" cy="363.1595" fill="green" r="5" /><circle cx="502.4319" cy="407.3014" fill="green" r="5" /><circle cx="329.987" cy="569.5186" fill="green" r="5" /><circle cx="485.0046" cy="259.2276" fill="green" r="5" /></svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -43,6 +43,10 @@ def merge(n1, n2):
returner = []
returner.append(lat)
returner.append(lon)
for i in range(2, len(n1)):
returner.append(n1[i])
for i in range(2, len(n2)):
returner.append(n2[i])
return returner
@ -50,7 +54,7 @@ def get_space_location(space):
try:
spacerequest = requests.get(url=data[space], timeout=1)
spacedata = spacerequest.json()
except requests.exceptions.RequestException as _: # This is the correct syntax
except requests.exceptions.RequestException as _:
return
except json.JSONDecodeError as _:
return
@ -58,7 +62,7 @@ def get_space_location(space):
if "lat" in spacedata["location"]:
lat = spacedata["location"]["lat"]
lon = spacedata["location"]["lon"]
return [float(lat), float(lon)]
return [float(lat), float(lon), data[space]]
if os.path.isfile('locations.bin'):
@ -66,7 +70,7 @@ if os.path.isfile('locations.bin'):
with open("locations.bin", "rb") as f:
locations = pickle.load(f)
else:
print("offline data not available, downloading...,", file=sys.stderr)
print("offline data not available, downloading...", file=sys.stderr)
r = requests.get(url=URL)
data = r.json()
with concurrent.futures.ThreadPoolExecutor(max_workers=16) as executor:
@ -114,11 +118,10 @@ while german_locations:
{"MERGED: " + n1 + " " + conflictnode: mergenode})
for space in finallist:
#print(space + " " + str(finallist[space][0]) + " " + str(finallist[space][1]))
print(str(finallist[space][0]) + " " + str(finallist[space][1]) + " {" +
space + "}")
dwg = svgwrite.Drawing('svgwrite-example.svg', profile='tiny')
dwg = svgwrite.Drawing('dots.svg', profile='tiny')
dwg.add(svgwrite.image.Image(href="Karte_Deutschland.svg", size=(586, 793)))
for space in finallist:
ypoint = (793 - (((finallist[space][0] - SOUTHERNMOST) / YSPAN) * 793))
@ -126,3 +129,13 @@ for space in finallist:
dwg.add(dwg.circle(center=(xpoint, ypoint), r=5, fill='green'))
dwg.save()
ledconf = open("conf.yml", "w")
i = 0
for space in finallist:
ledconf.write("led" + str(i) + ":\n")
for u in range(2, len(finallist[space])):
ledconf.write(" - " + finallist[space][u] + "\n")
i = i + 1

Binary file not shown.