add script to generate lat & lon
This commit is contained in:
parent
9605a20e22
commit
d9828405ba
|
@ -0,0 +1,6 @@
|
|||
bin/
|
||||
lib/
|
||||
lib64
|
||||
pyvenv.cfg
|
||||
share/
|
||||
status.json
|
|
@ -0,0 +1,13 @@
|
|||
import requests
|
||||
|
||||
|
||||
with open('status.json.in') as st_in:
|
||||
content = st_in.read()
|
||||
|
||||
obj = requests.get("http://api.open-notify.org/iss-now.json").json()
|
||||
|
||||
lat = obj['iss_position']['latitude']
|
||||
lon = obj['iss_position']['longitude']
|
||||
|
||||
with open('status.json', 'w') as st_out:
|
||||
st_out.write(content % (lat, lon))
|
|
@ -0,0 +1 @@
|
|||
requests
|
|
@ -1 +0,0 @@
|
|||
{"space": "ChaosZone", "url": "https://chaoszone.cz", "issue_report_channels": ["email"], "contact": {"email": "chaoszone@eigenbaukombinat.de"}, "state": {"open": false, "icon": {"open": "", "closed": ""}}, "api": "0.13", "location": {"lat": 0, "lon": 0, "address": "Eastside"}, "logo": "https://cfp.chaoszone.cz/media/csr20/img/chaoszone.png", "feeds": {"calendar": {"url": "https://raw.githubusercontent.com/chaosz0ne/spaceapi/master/chaoszone.ics", "type": "ical"}}}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"space": "ChaosZone",
|
||||
"url": "https://chaoszone.cz",
|
||||
"issue_report_channels": ["email"],
|
||||
"contact": {
|
||||
"email": "chaoszone@eigenbaukombinat.de"},
|
||||
"state": {
|
||||
"open": false, "icon": {"open": "", "closed": ""}},
|
||||
"api": "0.13",
|
||||
"location": {
|
||||
"lat": %s, "lon": %s, "address": "Eastside"},
|
||||
"logo": "https://cfp.chaoszone.cz/media/csr20/img/chaoszone.png",
|
||||
"feeds": {
|
||||
"calendar": {
|
||||
"url": "https://raw.githubusercontent.com/chaosz0ne/spaceapi/master/chaoszone.ics",
|
||||
"type": "ical"}}
|
||||
}
|
Loading…
Reference in New Issue