mirror of
https://codeberg.org/herrthees/ODW-Abfallkalender-Bot-Demo.git
synced 2025-08-02 08:37:34 +00:00
Quellcode formatieren
This commit is contained in:
parent
83cb6ae3ae
commit
bad0e5aa86
1 changed files with 23 additions and 19 deletions
|
@ -42,10 +42,12 @@ if len(abfallkalender['records']) > 0:
|
|||
# die morgen dort geholt wird
|
||||
for orte in abfallkalender['records']:
|
||||
try:
|
||||
stadtteil[orte['fields']['stadtteil_name']].append(orte['fields']['kategorie'])
|
||||
stadtteil[orte['fields']['stadtteil_name']].append(
|
||||
orte['fields']['kategorie'])
|
||||
except KeyError:
|
||||
stadtteil[orte['fields']['stadtteil_name']] = []
|
||||
stadtteil[orte['fields']['stadtteil_name']].append(orte['fields']['kategorie'])
|
||||
stadtteil[orte['fields']['stadtteil_name']].append(
|
||||
orte['fields']['kategorie'])
|
||||
|
||||
# Ausgabe zusammenbasteln:
|
||||
for (aktuellerStadtteil, abfallart) in stadtteil.items():
|
||||
|
@ -62,5 +64,7 @@ if len(abfallkalender['records']) > 0:
|
|||
|
||||
# Die Ausgabe
|
||||
print(ausgabe)
|
||||
|
||||
# Wenn es keine Daten für den morgigen Tag gibt
|
||||
else:
|
||||
print('Morgen keine Termine im Abfallkalender.')
|
Loading…
Add table
Add a link
Reference in a new issue