api_template angepaßt und als variable in den code

This commit is contained in:
bernd 2023-10-17 21:05:03 +02:00
parent 4b19063b66
commit af75b864df

View file

@ -194,11 +194,6 @@ def change_status(status, timestamp, api_template, filename):
return: boolean return: boolean
''' '''
logging.debug('Change status API') logging.debug('Change status API')
# todo: use walrus operator := when migrating to python >= 3.8
# data = read_api(filename)
# if data is False:
# return False
if os.access(filename, os.W_OK): if os.access(filename, os.W_OK):
logging.debug('API file is writable') logging.debug('API file is writable')
with open(filename, 'w') as api_file: with open(filename, 'w') as api_file:
@ -365,29 +360,27 @@ def main():
"open": False, "open": False,
"lastchange": 1563499131, "lastchange": 1563499131,
"icon": { "icon": {
"open":"https://status.krautspace.de/images/krautspace_pixelicon_open.png", "open":"https://status.krautspace.de/images/status-open.png",
"closed":"https://status.krautspace.de/images/krautspace_pixelicon_closed.png" "closed":"https://status.krautspace.de/images/status-closed.png"
} }
}, },
"feeds": { "feeds": {
"calendar": { "calendar": {
"type": "ical", "type": "ical",
"url": "https://kraut.space/krautspace.ics" "url": "https://cloud.kraut.space/remote.php/dav/public-calendars/2EkPGt3PF6WwYsA3?export"
} }
}, },
"contact": { "contact": {
"mastodon": "https://chaos.social/@krautspace", "mastodon": "@krautspace@chaos.social",
"matrix": "#krautchan:matrix.kraut.space", "matrix": "#krautchan:matrix.kraut.space",
"email": "office@krautspace.de" "email": "office@krautspace.de"
}, },
"issue_report_channels": [ "issue_report_channels": [
"mastodon",
"matrix", "matrix",
"email" "email"
], ],
"projects": [ "projects": [
"https://git.kraut.space", "https://git.kraut.space/Krautspace"
"https://github.com/HackspaceJena/"
] ]
} }