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
'''
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):
logging.debug('API file is writable')
with open(filename, 'w') as api_file:
@ -365,29 +360,27 @@ def main():
"open": False,
"lastchange": 1563499131,
"icon": {
"open":"https://status.krautspace.de/images/krautspace_pixelicon_open.png",
"closed":"https://status.krautspace.de/images/krautspace_pixelicon_closed.png"
"open":"https://status.krautspace.de/images/status-open.png",
"closed":"https://status.krautspace.de/images/status-closed.png"
}
},
"feeds": {
"calendar": {
"type": "ical",
"url": "https://kraut.space/krautspace.ics"
"url": "https://cloud.kraut.space/remote.php/dav/public-calendars/2EkPGt3PF6WwYsA3?export"
}
},
"contact": {
"mastodon": "https://chaos.social/@krautspace",
"mastodon": "@krautspace@chaos.social",
"matrix": "#krautchan:matrix.kraut.space",
"email": "office@krautspace.de"
},
"issue_report_channels": [
"mastodon",
"matrix",
"email"
],
"projects": [
"https://git.kraut.space",
"https://github.com/HackspaceJena/"
"https://git.kraut.space/Krautspace"
]
}