added support for cities managed in CITIES (App)

This commit is contained in:
5ila5
2023-04-13 14:03:55 +02:00
parent 0884485daa
commit b694280c4d
7 changed files with 1435 additions and 1 deletions

153
README.md
View File

@@ -55,11 +55,164 @@ Waste collection schedules in the following formats and countries are supported.
<details>
<summary>Austria</summary>
- [Andau](/doc/source/citiesapps_com.md) / andau-gemeinde.at
- [Apetlon](/doc/source/citiesapps_com.md) / gemeinde-apetlon.at
- [App CITIES](/doc/source/citiesapps_com.md) / citiesapps.com
- [Bad Blumau](/doc/source/citiesapps_com.md) / bad-blumau-gemeinde.at
- [Bad Gleichenberg](/doc/source/citiesapps_com.md) / bad-gleichenberg.gv.at
- [Bad Loipersdorf](/doc/source/citiesapps_com.md) / gemeinde.loipersdorf.at
- [Bad Radkersburg](/doc/source/citiesapps_com.md) / bad-radkersburg.gv.at
- [Bad Tatzmannsdorf](/doc/source/citiesapps_com.md) / bad-tatzmannsdorf.at
- [Bildein](/doc/source/citiesapps_com.md) / bildein.at
- [Breitenbrunn am Neusiedler See](/doc/source/citiesapps_com.md) / breitenbrunn.at
- [Breitenstein](/doc/source/citiesapps_com.md) / breitenstein.at
- [Bruckneudorf](/doc/source/citiesapps_com.md) / bruckneudorf.eu
- [Buch - St. Magdalena](/doc/source/citiesapps_com.md) / buch-stmagdalena.at
- [Burgau](/doc/source/citiesapps_com.md) / burgau.info
- [Burgenländischer Müllverband](/doc/source/bmv_at.md) / bmv.at
- [Dechantskirchen](/doc/source/citiesapps_com.md) / dechantskirchen.gv.at
- [Deutsch Goritz](/doc/source/citiesapps_com.md) / deutsch-goritz.at
- [Deutsch Jahrndorf](/doc/source/citiesapps_com.md) / deutsch-jahrndorf.at
- [Deutsch Kaltenbrunn](/doc/source/citiesapps_com.md) / deutschkaltenbrunn.eu
- [Deutschkreutz](/doc/source/citiesapps_com.md) / deutschkreutz.at
- [Dobl-Zwaring](/doc/source/citiesapps_com.md) / dobl-zwaring.gv.at
- [Draßmarkt](/doc/source/citiesapps_com.md) / drassmarkt.at
- [Eberau](/doc/source/citiesapps_com.md) / eberau.riskommunal.net
- [Eberndorf](/doc/source/citiesapps_com.md) / eberndorf.at
- [Eberstein](/doc/source/citiesapps_com.md) / eberstein.at
- [Edelsbach bei Feldbach](/doc/source/citiesapps_com.md) / edelsbach.at
- [Eggersdorf bei Graz](/doc/source/citiesapps_com.md) / eggersdorf-graz.gv.at
- [Eisenstadt](/doc/source/citiesapps_com.md) / eisenstadt.gv.at
- [Fehring](/doc/source/citiesapps_com.md) / fehring.at
- [Feistritz ob Bleiburg](/doc/source/citiesapps_com.md) / feistritz-bleiburg.gv.at
- [Feldbach](/doc/source/citiesapps_com.md) / feldbach.gv.at
- [Frankenau-Unterpullendorf](/doc/source/citiesapps_com.md) / frankenau-unterpullendorf.gv.at
- [Frauenkirchen](/doc/source/citiesapps_com.md) / frauenkirchen.at
- [Freistadt](/doc/source/citiesapps_com.md) / freistadt.at
- [Friedberg](/doc/source/citiesapps_com.md) / friedberg.gv.at
- [Fürstenfeld](/doc/source/citiesapps_com.md) / fuerstenfeld.gv.at
- [Gabersdorf](/doc/source/citiesapps_com.md) / gabersdorf.gv.at
- [Gattendorf](/doc/source/citiesapps_com.md) / gattendorf.at
- [Gols](/doc/source/citiesapps_com.md) / gols.at
- [Grafendorf bei Hartberg](/doc/source/citiesapps_com.md) / grafendorf.at
- [Grafenstein](/doc/source/citiesapps_com.md) / grafenstein.gv.at
- [Gratkorn](/doc/source/citiesapps_com.md) / gratkorn.gv.at
- [Großwarasdorf](/doc/source/citiesapps_com.md) / grosswarasdorf.at
- [Großwilfersdorf](/doc/source/citiesapps_com.md) / grosswilfersdorf.steiermark.at
- [Gutenberg-Stenzengreith](/doc/source/citiesapps_com.md) / gutenberg-stenzengreith.gv.at
- [Güssing](/doc/source/citiesapps_com.md) / guessing.co.at
- [Hartberg](/doc/source/citiesapps_com.md) / hartberg.at
- [Heiligenkreuz am Waasen](/doc/source/citiesapps_com.md) / heiligenkreuz-waasen.gv.at
- [Hofstätten an der Raab](/doc/source/citiesapps_com.md) / hofstaetten.at
- [Horitschon](/doc/source/citiesapps_com.md) / horitschon.at
- [Hornstein](/doc/source/citiesapps_com.md) / hornstein.at
- [Hüttenberg](/doc/source/citiesapps_com.md) / huettenberg.at
- [Ilz](/doc/source/citiesapps_com.md) / ilz.at
- [infeo](/doc/source/infeo_at.md) / infeo.at
- [Jabing](/doc/source/citiesapps_com.md) / gemeinde-jabing.at
- [Jagerberg](/doc/source/citiesapps_com.md) / jagerberg.info
- [Kaindorf](/doc/source/citiesapps_com.md) / kaindorf.at
- [Kaisersdorf](/doc/source/citiesapps_com.md) / kaisersdorf.com
- [Kalsdorf bei Graz](/doc/source/citiesapps_com.md) / kalsdorf-graz.gv.at
- [Kapfenstein](/doc/source/citiesapps_com.md) / kapfenstein.at
- [Kirchberg an der Raab](/doc/source/citiesapps_com.md) / kirchberg-raab.gv.at
- [Kleinmürbisch](/doc/source/citiesapps_com.md) / kleinmuerbisch.at
- [Klingenbach](/doc/source/citiesapps_com.md) / klingenbach.at
- [Klöch](/doc/source/citiesapps_com.md) / kloech.com
- [Kohfidisch](/doc/source/citiesapps_com.md) / kohfidisch.at
- [Korneuburg](/doc/source/citiesapps_com.md) / korneuburg.gv.at
- [Laa an der Thaya](/doc/source/citiesapps_com.md) / laa.at
- [Leithaprodersdorf](/doc/source/citiesapps_com.md) / leithaprodersdorf.at
- [Lieboch](/doc/source/citiesapps_com.md) / lieboch.gv.at
- [Litzelsdorf](/doc/source/citiesapps_com.md) / litzelsdorf.at
- [Loipersbach im Burgenland](/doc/source/citiesapps_com.md) / loipersbach.info
- [Mariasdorf](/doc/source/citiesapps_com.md) / mariasdorf.at
- [Markt Hartmannsdorf](/doc/source/citiesapps_com.md) / markthartmannsdorf.at
- [Markt Neuhodis](/doc/source/citiesapps_com.md) / markt-neuhodis.at
- [Marz](/doc/source/citiesapps_com.md) / marz.gv.at
- [Mattersburg](/doc/source/citiesapps_com.md) / mattersburg.gv.at
- [Melk](/doc/source/citiesapps_com.md) / stadt-melk.at
- [Mettersdorf am Saßbach](/doc/source/citiesapps_com.md) / mettersdorf.com
- [Mischendorf](/doc/source/citiesapps_com.md) / mischendorf.at
- [Mistelbach](/doc/source/citiesapps_com.md) / mistelbach.at
- [Mitterdorf an der Raab](/doc/source/citiesapps_com.md) / mitterdorf-raab.at
- [Mureck](/doc/source/citiesapps_com.md) / mureck.gv.at
- [Mörbisch am See](/doc/source/citiesapps_com.md) / moerbisch.gv.at
- [Neudorf bei Parndorf](/doc/source/citiesapps_com.md) / neudorfbeiparndorf.at
- [Neufeld an der Leitha](/doc/source/citiesapps_com.md) / neufeld-leitha.at
- [Neusiedl am See](/doc/source/citiesapps_com.md) / neusiedlamsee.at
- [Nickelsdorf](/doc/source/citiesapps_com.md) / nickelsdorf.gv.at
- [Oberpullendorf](/doc/source/citiesapps_com.md) / oberpullendorf.gv.at
- [Oberwart](/doc/source/citiesapps_com.md) / oberwart.gv.at
- [Oslip](/doc/source/citiesapps_com.md) / oslip.at
- [Ottendorf an der Rittschein](/doc/source/citiesapps_com.md) / ottendorf-rittschein.steiermark.at
- [Paldau](/doc/source/citiesapps_com.md) / paldau.gv.at
- [Pamhagen](/doc/source/citiesapps_com.md) / gemeinde-pamhagen.at
- [Parndorf](/doc/source/citiesapps_com.md) / gemeinde-parndorf.at
- [Peggau](/doc/source/citiesapps_com.md) / peggau.at
- [Pernegg an der Mur](/doc/source/citiesapps_com.md) / pernegg.at
- [Pilgersdorf](/doc/source/citiesapps_com.md) / pilgersdorf.at
- [Pinggau](/doc/source/citiesapps_com.md) / pinggau.gv.at
- [Pinkafeld](/doc/source/citiesapps_com.md) / pinkafeld.gv.at
- [Podersdorf am See](/doc/source/citiesapps_com.md) / gemeindepodersdorfamsee.at
- [Poggersdorf](/doc/source/citiesapps_com.md) / gemeinde-poggersdorf.at
- [Potzneusiedl](/doc/source/citiesapps_com.md) / potzneusiedl.at
- [Poysdorf](/doc/source/citiesapps_com.md) / poysdorf.at
- [Pöchlarn](/doc/source/citiesapps_com.md) / poechlarn.at
- [Radmer](/doc/source/citiesapps_com.md) / radmer.at
- [Ragnitz](/doc/source/citiesapps_com.md) / ragnitz.gv.at
- [Raiding](/doc/source/citiesapps_com.md) / raiding-online.at
- [Rudersdorf](/doc/source/citiesapps_com.md) / rudersdorf.at
- [Rust](/doc/source/citiesapps_com.md) / freistadt-rust.at
- [Saalfelden am Steinernen Meer](/doc/source/citiesapps_com.md) / stadtmarketing-saalfelden.at
- [Sankt Oswald bei Plankenwarth](/doc/source/citiesapps_com.md) / sanktoswald.net
- [Schäffern](/doc/source/citiesapps_com.md) / schaeffern.gv.at
- [Schützen am Gebirge](/doc/source/citiesapps_com.md) / schuetzen-am-gebirge.at
- [Seiersberg-Pirka](/doc/source/citiesapps_com.md) / gemeindekurier.at
- [Sigleß](/doc/source/citiesapps_com.md) / sigless.at
- [Sinabelkirchen](/doc/source/citiesapps_com.md) / sinabelkirchen.eu
- [St. Andrä](/doc/source/citiesapps_com.md) / st-andrae.gv.at
- [St. Anna am Aigen](/doc/source/citiesapps_com.md) / st-anna-aigen.gv.at
- [St. Johann in der Haide](/doc/source/citiesapps_com.md) / st-johann-haide.gv.at
- [St. Lorenzen am Wechsel](/doc/source/citiesapps_com.md) / st-lorenzen-wechsel.at
- [St. Margarethen an der Raab](/doc/source/citiesapps_com.md) / st-margarethen-raab.at
- [St. Margarethen im Burgenland](/doc/source/citiesapps_com.md) / st-margarethen.at
- [St. Peter - Freienstein](/doc/source/citiesapps_com.md) / st-peter-freienstein.gv.at
- [St. Peter am Ottersbach](/doc/source/citiesapps_com.md) / st-peter-ottersbach.gv.at
- [St. Ruprecht an der Raab](/doc/source/citiesapps_com.md) / st.ruprecht.at
- [St. Veit in der Südsteiermark](/doc/source/citiesapps_com.md) / st-veit-suedsteiermark.gv.at
- [Stadtservice Korneuburg](/doc/source/korneuburg_stadtservice_at.md) / korneuburg.gv.at
- [Stegersbach](/doc/source/citiesapps_com.md) / gemeinde.stegersbach.at
- [Steinbrunn](/doc/source/citiesapps_com.md) / steinbrunn.at
- [Steuerberg](/doc/source/citiesapps_com.md) / steuerberg.at
- [Stinatz](/doc/source/citiesapps_com.md) / stinatz.gv.at
- [Stiwoll](/doc/source/citiesapps_com.md) / stiwoll.at
- [Stockerau](/doc/source/citiesapps_com.md) / stockerau.at
- [Söchau](/doc/source/citiesapps_com.md) / soechau.steiermark.at
- [Thal](/doc/source/citiesapps_com.md) / thal.gv.at
- [Tieschen](/doc/source/citiesapps_com.md) / tieschen.gv.at
- [Tulln an der Donau](/doc/source/citiesapps_com.md) / tulln.at
- [Umweltprofis](/doc/source/data_umweltprofis_at.md) / umweltprofis.at
- [Unterfrauenhaid](/doc/source/citiesapps_com.md) / unterfrauenhaid.at
- [Unterkohlstätten](/doc/source/citiesapps_com.md) / unterkohlstaetten.at
- [Unterlamm](/doc/source/citiesapps_com.md) / unterlamm.gv.at
- [Vasoldsberg](/doc/source/citiesapps_com.md) / vasoldsberg.gv.at
- [Vordernberg](/doc/source/citiesapps_com.md) / vordernberg.steiermark.at
- [Völkermarkt](/doc/source/citiesapps_com.md) / voelkermarkt.gv.at
- [Weiz](/doc/source/citiesapps_com.md) / weiz.at
- [Werfenweng](/doc/source/citiesapps_com.md) / gemeinde-werfenweng.at
- [Wies](/doc/source/citiesapps_com.md) / wies.at
- [Wiesen](/doc/source/citiesapps_com.md) / wiesen.eu
- [Wiesfleck](/doc/source/citiesapps_com.md) / gemeinde-wiesfleck.at
- [Wimpassing an der Leitha](/doc/source/citiesapps_com.md) / wimpassing-leitha.at
- [Winden am See](/doc/source/citiesapps_com.md) / winden.at
- [Wolfsberg](/doc/source/citiesapps_com.md) / wolfsberg.at
- [Wolkersdorf im Weinviertel](/doc/source/citiesapps_com.md) / wolkersdorf.at
- [WSZ Moosburg](/doc/source/wsz_moosburg_at.md) / wsz-moosburg.at
- [Zagersdorf](/doc/source/citiesapps_com.md) / zagersdorf.at
- [Zillingtal](/doc/source/citiesapps_com.md) / zillingtal.eu
- [Zurndorf](/doc/source/citiesapps_com.md) / zurndorf.at
- [Übelbach](/doc/source/citiesapps_com.md) / uebelbach.gv.at
</details>
<details>

View File

@@ -0,0 +1,886 @@
import requests
import json
import re
import urllib.parse
SERVICE_MAP = [
{
"title": "Fürstenfeld",
"url": "https://www.fuerstenfeld.gv.at",
"country": "at",
},
{
"title": "Söchau",
"url": "http://www.soechau.steiermark.at",
"country": "at",
},
{
"title": "Bad Loipersdorf",
"url": "https://gemeinde.loipersdorf.at",
"country": "at",
},
{
"title": "Rudersdorf",
"url": "http://www.rudersdorf.at",
"country": "at",
},
{
"title": "Großwilfersdorf",
"url": "http://www.grosswilfersdorf.steiermark.at",
"country": "at",
},
{
"title": "Bad Blumau",
"url": "https://bad-blumau-gemeinde.at",
"country": "at",
},
{
"title": "Buch - St. Magdalena",
"url": "http://www.buch-stmagdalena.at",
"country": "at",
},
{
"title": "Burgau",
"url": "https://www.burgau.info",
"country": "at",
},
{
"title": "Dechantskirchen",
"url": "https://dechantskirchen.gv.at",
"country": "at",
},
{
"title": "Friedberg",
"url": "https://www.friedberg.gv.at",
"country": "at",
},
{
"title": "Grafendorf bei Hartberg",
"url": "https://grafendorf.at",
"country": "at",
},
{
"title": "Ilz",
"url": "https://www.ilz.at",
"country": "at",
},
{
"title": "Kaindorf",
"url": "https://www.kaindorf.at",
"country": "at",
},
{
"title": "Ottendorf an der Rittschein",
"url": "https://www.ottendorf-rittschein.steiermark.at",
"country": "at",
},
{
"title": "Pinggau",
"url": "https://www.pinggau.gv.at",
"country": "at",
},
{
"title": "St. Johann in der Haide",
"url": "http://www.st-johann-haide.gv.at",
"country": "at",
},
{
"title": "St. Lorenzen am Wechsel",
"url": "https://www.st-lorenzen-wechsel.at",
"country": "at",
},
{
"title": "Schäffern",
"url": "https://www.schaeffern.gv.at",
"country": "at",
},
{
"title": "Bad Gleichenberg",
"url": "http://www.bad-gleichenberg.gv.at",
"country": "at",
},
{
"title": "Deutsch Goritz",
"url": "https://www.deutsch-goritz.at",
"country": "at",
},
{
"title": "Edelsbach bei Feldbach",
"url": "http://www.edelsbach.at",
"country": "at",
},
{
"title": "Jagerberg",
"url": "http://www.jagerberg.info",
"country": "at",
},
{
"title": "Kapfenstein",
"url": "http://www.kapfenstein.at",
"country": "at",
},
{
"title": "Kirchberg an der Raab",
"url": "https://www.kirchberg-raab.gv.at",
"country": "at",
},
{
"title": "Klöch",
"url": "https://www.kloech.com",
"country": "at",
},
{
"title": "Mettersdorf am Saßbach",
"url": "http://www.mettersdorf.com",
"country": "at",
},
{
"title": "Mureck",
"url": "https://www.mureck.gv.at",
"country": "at",
},
{
"title": "Paldau",
"url": "http://www.paldau.gv.at",
"country": "at",
},
{
"title": "St. Anna am Aigen",
"url": "http://www.st-anna-aigen.gv.at",
"country": "at",
},
{
"title": "St. Peter am Ottersbach",
"url": "http://www.st-peter-ottersbach.gv.at",
"country": "at",
},
{
"title": "Tieschen",
"url": "https://www.tieschen.gv.at",
"country": "at",
},
{
"title": "Unterlamm",
"url": "http://www.unterlamm.gv.at",
"country": "at",
},
{
"title": "Gutenberg-Stenzengreith",
"url": "https://www.gutenberg-stenzengreith.gv.at",
"country": "at",
},
{
"title": "Hofstätten an der Raab",
"url": "https://www.hofstaetten.at",
"country": "at",
},
{
"title": "Markt Hartmannsdorf",
"url": "https://www.markthartmannsdorf.at",
"country": "at",
},
{
"title": "Mitterdorf an der Raab",
"url": "https://www.mitterdorf-raab.at",
"country": "at",
},
{
"title": "St. Margarethen an der Raab",
"url": "https://www.st-margarethen-raab.at",
"country": "at",
},
{
"title": "St. Ruprecht an der Raab",
"url": "https://www.st.ruprecht.at",
"country": "at",
},
{
"title": "Sinabelkirchen",
"url": "https://www.sinabelkirchen.eu",
"country": "at",
},
{
"title": "Deutsch Kaltenbrunn",
"url": "https://www.deutschkaltenbrunn.eu",
"country": "at",
},
{
"title": "Bildein",
"url": "http://www.bildein.at",
"country": "at",
},
{
"title": "Eberau",
"url": "https://eberau.riskommunal.net",
"country": "at",
},
{
"title": "Güssing",
"url": "https://www.guessing.co.at",
"country": "at",
},
{
"title": "Kleinmürbisch",
"url": "https://www.kleinmuerbisch.at",
"country": "at",
},
{
"title": "Melk",
"url": "https://www.stadt-melk.at",
"country": "at",
},
{
"title": "Stegersbach",
"url": "https://gemeinde.stegersbach.at",
"country": "at",
},
{
"title": "Stinatz",
"url": "http://www.stinatz.gv.at",
"country": "at",
},
{
"title": "Tulln an der Donau",
"url": "https://www.tulln.at",
"country": "at",
},
{
"title": "Pöchlarn",
"url": "https://www.poechlarn.at",
"country": "at",
},
{
"title": "Stockerau",
"url": "http://www.stockerau.at",
"country": "at",
},
{
"title": "Dobl-Zwaring",
"url": "https://www.dobl-zwaring.gv.at",
"country": "at",
},
{
"title": "Seiersberg-Pirka",
"url": "https://www.gemeindekurier.at",
"country": "at",
},
{
"title": "Korneuburg",
"url": "https://www.korneuburg.gv.at",
"country": "at",
},
{
"title": "Hartberg",
"url": "https://www.hartberg.at",
"country": "at",
},
{
"title": "Bad Radkersburg",
"url": "https://www.bad-radkersburg.gv.at",
"country": "at",
},
{
"title": "Wolfsberg",
"url": "https://www.wolfsberg.at",
"country": "at",
},
{
"title": "Deutschkreutz",
"url": "https://www.deutschkreutz.at",
"country": "at",
},
{
"title": "Fehring",
"url": "http://www.fehring.at",
"country": "at",
},
{
"title": "Eisenstadt",
"url": "https://www.eisenstadt.gv.at",
"country": "at",
},
{
"title": "Saalfelden am Steinernen Meer",
"url": "https://www.stadtmarketing-saalfelden.at",
"country": "at",
},
{
"title": "Mattersburg",
"url": "https://www.mattersburg.gv.at",
"country": "at",
},
{
"title": "Freistadt",
"url": "https://www.freistadt.at",
"country": "at",
},
{
"title": "Feldbach",
"url": "https://www.feldbach.gv.at",
"country": "at",
},
{
"title": "Weiz",
"url": "https://www.weiz.at",
"country": "at",
},
{
"title": "Oberpullendorf",
"url": "https://www.oberpullendorf.gv.at",
"country": "at",
},
{
"title": "St. Margarethen im Burgenland",
"url": "https://www.st-margarethen.at",
"country": "at",
},
{
"title": "Hornstein",
"url": "https://www.hornstein.at",
"country": "at",
},
{
"title": "Raiding",
"url": "https://www.raiding-online.at",
"country": "at",
},
{
"title": "Wiesen",
"url": "https://www.wiesen.eu",
"country": "at",
},
{
"title": "Bad Tatzmannsdorf",
"url": "http://www.bad-tatzmannsdorf.at",
"country": "at",
},
{
"title": "Breitenbrunn am Neusiedler See",
"url": "http://www.breitenbrunn.at",
"country": "at",
},
{
"title": "Leithaprodersdorf",
"url": "http://www.leithaprodersdorf.at",
"country": "at",
},
{
"title": "Wimpassing an der Leitha",
"url": "http://www.wimpassing-leitha.at",
"country": "at",
},
{
"title": "Rust",
"url": "https://www.freistadt-rust.at",
"country": "at",
},
{
"title": "Winden am See",
"url": "https://www.winden.at",
"country": "at",
},
{
"title": "Schützen am Gebirge",
"url": "https://www.schuetzen-am-gebirge.at",
"country": "at",
},
{
"title": "Großwarasdorf",
"url": "https://www.grosswarasdorf.at",
"country": "at",
},
{
"title": "Horitschon",
"url": "http://www.horitschon.at",
"country": "at",
},
{
"title": "Zagersdorf",
"url": "http://www.zagersdorf.at",
"country": "at",
},
{
"title": "Deutsch Jahrndorf",
"url": "https://www.deutsch-jahrndorf.at",
"country": "at",
},
{
"title": "Bruckneudorf",
"url": "http://www.bruckneudorf.eu",
"country": "at",
},
{
"title": "Mischendorf",
"url": "https://www.mischendorf.at",
"country": "at",
},
{
"title": "Pinkafeld",
"url": "https://www.pinkafeld.gv.at",
"country": "at",
},
{
"title": "Vasoldsberg",
"url": "https://www.vasoldsberg.gv.at",
"country": "at",
},
{
"title": "Heiligenkreuz am Waasen",
"url": "https://www.heiligenkreuz-waasen.gv.at",
"country": "at",
},
{
"title": "Jabing",
"url": "https://www.gemeinde-jabing.at",
"country": "at",
},
{
"title": "Gattendorf",
"url": "https://www.gattendorf.at",
"country": "at",
},
{
"title": "Sigleß",
"url": "https://www.sigless.at",
"country": "at",
},
{
"title": "Neudorf bei Parndorf",
"url": "http://www.neudorfbeiparndorf.at",
"country": "at",
},
{
"title": "Thal",
"url": "https://thal.gv.at",
"country": "at",
},
{
"title": "Potzneusiedl",
"url": "https://www.potzneusiedl.at",
"country": "at",
},
{
"title": "Gols",
"url": "https://www.gols.at",
"country": "at",
},
{
"title": "Eberndorf",
"url": "https://www.eberndorf.at",
"country": "at",
},
{
"title": "Ragnitz",
"url": "https://www.ragnitz.gv.at",
"country": "at",
},
{
"title": "Stiwoll",
"url": "https://www.stiwoll.at",
"country": "at",
},
{
"title": "Litzelsdorf",
"url": "https://www.litzelsdorf.at",
"country": "at",
},
{
"title": "Neufeld an der Leitha",
"url": "https://www.neufeld-leitha.at",
"country": "at",
},
{
"title": "Neusiedl am See",
"url": "https://www.neusiedlamsee.at",
"country": "at",
},
{
"title": "Klingenbach",
"url": "https://klingenbach.at",
"country": "at",
},
{
"title": "Zurndorf",
"url": "https://zurndorf.at",
"country": "at",
},
{
"title": "Wiesfleck",
"url": "https://www.gemeinde-wiesfleck.at",
"country": "at",
},
{
"title": "Wolkersdorf im Weinviertel",
"url": "http://www.wolkersdorf.at",
"country": "at",
},
{
"title": "Poysdorf",
"url": "https://www.poysdorf.at",
"country": "at",
},
{
"title": "Laa an der Thaya",
"url": "http://www.laa.at",
"country": "at",
},
{
"title": "Mistelbach",
"url": "https://www.mistelbach.at",
"country": "at",
},
{
"title": "Wies",
"url": "https://www.wies.at",
"country": "at",
},
{
"title": "Unterkohlstätten",
"url": "https://www.unterkohlstaetten.at",
"country": "at",
},
{
"title": "Übelbach",
"url": "https://www.uebelbach.gv.at",
"country": "at",
},
{
"title": "Frauenkirchen",
"url": "https://www.frauenkirchen.at",
"country": "at",
},
{
"title": "Zillingtal",
"url": "https://www.zillingtal.eu",
"country": "at",
},
{
"title": "Andau",
"url": "https://www.andau-gemeinde.at",
"country": "at",
},
{
"title": "Sankt Oswald bei Plankenwarth",
"url": "https://www.sanktoswald.net",
"country": "at",
},
{
"title": "Draßmarkt",
"url": "http://www.drassmarkt.at",
"country": "at",
},
{
"title": "Feistritz ob Bleiburg",
"url": "https://feistritz-bleiburg.gv.at",
"country": "at",
},
{
"title": "Pamhagen",
"url": "https://www.gemeinde-pamhagen.at",
"country": "at",
},
{
"title": "Podersdorf am See",
"url": "http://www.gemeindepodersdorfamsee.at",
"country": "at",
},
{
"title": "St. Veit in der Südsteiermark",
"url": "https://www.st-veit-suedsteiermark.gv.at",
"country": "at",
},
{
"title": "Peggau",
"url": "https://peggau.at",
"country": "at",
},
{
"title": "Frankenau-Unterpullendorf",
"url": "https://www.frankenau-unterpullendorf.gv.at",
"country": "at",
},
{
"title": "Marz",
"url": "https://www.marz.gv.at",
"country": "at",
},
{
"title": "Völkermarkt",
"url": "https://voelkermarkt.gv.at",
"country": "at",
},
{
"title": "Vordernberg",
"url": "http://www.vordernberg.steiermark.at",
"country": "at",
},
{
"title": "Parndorf",
"url": "http://www.gemeinde-parndorf.at",
"country": "at",
},
{
"title": "Oberwart",
"url": "https://www.oberwart.gv.at",
"country": "at",
},
{
"title": "Kalsdorf bei Graz",
"url": "https://www.kalsdorf-graz.gv.at",
"country": "at",
},
{
"title": "Grafenstein",
"url": "https://grafenstein.gv.at",
"country": "at",
},
{
"title": "Gratkorn",
"url": "https://www.gratkorn.gv.at",
"country": "at",
},
{
"title": "Steuerberg",
"url": "https://www.steuerberg.at",
"country": "at",
},
{
"title": "St. Peter - Freienstein",
"url": "https://www.st-peter-freienstein.gv.at",
"country": "at",
},
{
"title": "Oslip",
"url": "http://www.oslip.at",
"country": "at",
},
{
"title": "Loipersbach im Burgenland",
"url": "https://www.loipersbach.info",
"country": "at",
},
{
"title": "Eberstein",
"url": "https://www.eberstein.at",
"country": "at",
},
{
"title": "Pernegg an der Mur",
"url": "http://pernegg.at",
"country": "at",
},
{
"title": "Lieboch",
"url": "https://www.lieboch.gv.at",
"country": "at",
},
{
"title": "St. Andrä",
"url": "https://www.st-andrae.gv.at",
"country": "at",
},
{
"title": "Nickelsdorf",
"url": "https://www.nickelsdorf.gv.at",
"country": "at",
},
{
"title": "Radmer",
"url": "https://www.radmer.at",
"country": "at",
},
{
"title": "Breitenstein",
"url": "https://www.breitenstein.at",
"country": "at",
},
{
"title": "Eggersdorf bei Graz",
"url": "https://www.eggersdorf-graz.gv.at",
"country": "at",
},
{
"title": "Markt Neuhodis",
"url": "http://www.markt-neuhodis.at",
"country": "at",
},
{
"title": "Hüttenberg",
"url": "https://huettenberg.at",
"country": "at",
},
{
"title": "Mörbisch am See",
"url": "https://moerbisch.gv.at",
"country": "at",
},
{
"title": "Pilgersdorf",
"url": "https://www.pilgersdorf.at",
"country": "at",
},
{
"title": "Poggersdorf",
"url": "https://gemeinde-poggersdorf.at",
"country": "at",
},
{
"title": "Kohfidisch",
"url": "http://www.kohfidisch.at",
"country": "at",
},
{
"title": "Apetlon",
"url": "https://gemeinde-apetlon.at",
"country": "at",
},
{
"title": "Unterfrauenhaid",
"url": "https://www.unterfrauenhaid.at",
"country": "at",
},
{
"title": "Werfenweng",
"url": "http://www.gemeinde-werfenweng.at",
"country": "at",
},
{
"title": "Kaisersdorf",
"url": "http://www.kaisersdorf.com",
"country": "at",
},
{
"title": "Steinbrunn",
"url": "https://www.steinbrunn.at",
"country": "at",
},
{
"title": "Mariasdorf",
"url": "https://www.mariasdorf.at",
"country": "at",
},
{
"title": "Gabersdorf",
"url": "https://www.gabersdorf.gv.at",
"country": "at",
},
]
AUTH_TOKEN = "Basic NjQzNmI2NWFiZjBmYzkwMDEyOTdkNjU0OmQ1Y2IxMzYxNzJiODBkMmI0NTQyN2MyZDUyYTZhMTNmMDhlOGViZDE0M2FkNTVlNjI3MzZmZTY3ZjNkNw=="
class CitiesApps:
def __init__(self) -> None:
# get authentication as guest
self._session = requests.Session()
self._session.headers.update({"user-agent": "cities/1.17.12/Android"})
r = self._session.post("https://api.citiesapps.com/auth/guest",
headers={"Authorization": AUTH_TOKEN})
r.raise_for_status()
self._session.headers.update(
{"authorization": "Bearer " + r.json()["access_token"]})
def get_cities(self) -> list:
params = {
"filter": json.dumps({"type": {"$in": ["city"]}}, separators=(',', ':')),
# returns error with higher limit
"limit": 500,
}
params_str = urllib.parse.urlencode(params, safe=":$")
r = self._session.get(
"https://api.citiesapps.com/entities", params=params_str)
r.raise_for_status()
return r.json()["entities"]
def get_specific_citiy(self, search: str) -> dict | None:
for city in self.get_cities():
if city["name"].lower().strip() == search.lower().strip():
return city
return None
def get_garbage_calendars(self, city_id: str) -> list:
params = {
"filter": json.dumps({"entityid": {"$in": [city_id]}}, separators=(',', ':')),
}
params_str = urllib.parse.urlencode(params, safe=":$")
r = self._session.get(
"https://api.citiesapps.com/garbagecalendars/filter", params=params_str)
r.raise_for_status()
return r.json()["garbage_calendars"]
def get_streets(self, city_id):
params = {
"entityid": [city_id],
}
r = self._session.get(
"https://api.citiesapps.com/garbageareas", params=params)
r.raise_for_status()
return r.json()
def get_specific_calendar(self, city_id: str, search: str) -> dict | None:
for calendar in self.get_garbage_calendars(city_id):
if calendar["name"].lower().strip() == search.lower().strip():
return calendar
return None
def get_garbage_plans(self, garbage_calendar: dict) -> list:
r = self._session.get("https://api.citiesapps.com/garbagecalendars/",
params={"full": "true", "ids": garbage_calendar["_id"]})
r.raise_for_status()
garbage_plans = []
for cal in r.json():
garbage_plans += cal["garbage_plans"]
return garbage_plans
def fetch_garbage_plans(self, city: str, calendar: str):
city = self.get_specific_citiy(city)
if not city:
raise Exception("City not found")
city_id = city["_id"]
calendar = self.get_specific_calendar(city_id, calendar)
if not calendar:
raise Exception("Calendar not found")
return self.get_garbage_plans(calendar)
def get_supported_cities(self) -> list:
supported_dict = {"supported": [], "not_supported": []}
for city in self.get_cities():
if city["services"]["essentials"]["garbage_calendar"] and self.get_garbage_calendars(city["_id"]):
supported_dict["supported"].append(city)
else:
supported_dict["not_supported"].append(city)
return supported_dict
def generate_service_map(self):
supported_dict = self.get_supported_cities()
if len(supported_dict["not_supported"]) > 0:
print("# not supported: ", len(
supported_dict["not_supported"], ":", supported_dict["not_supported"]))
service_map = []
for city in supported_dict["supported"]:
slash_index = [m.start() for m in re.finditer('/', city["website_url"])]
domain_end = slash_index[2] if len(slash_index) > 2 else len(city["website_url"])
url = city["website_url"][:domain_end]
# city["country_abbreviation"] returns "de" instead of "at" sometimes
service_map.append({"title": city["name"], "url": url, "country": "at"})
return service_map
if __name__ == "__main__":
c = CitiesApps()
service_map: dict[list] = c.generate_service_map()
print("[")
for service in service_map:
print(4*" "+"{")
for key, value in service.items():
print(8*" "+f'"{key}": "{value}",')
print(4*" "+"},")
print("]")

View File

@@ -0,0 +1,66 @@
from waste_collection_schedule import Collection # type: ignore[attr-defined]
from waste_collection_schedule.service.CitiesAppsCom import CitiesApps, SERVICE_MAP
from datetime import datetime
EXTRA_INFO = SERVICE_MAP
TITLE = "App CITIES"
DESCRIPTION = "Source for App CITIES."
URL = "https://citiesapps.com"
TEST_CASES = {
"Fürstenfeld Haushalt Altenmarkt": {
"city": "Fürstenfeld",
"calendar": "Haushalt Altenmarkt"
},
"Buch - St. Magdalena Buch - St. Magdalena": {
"city": "Buch - St. Magdalena",
"calendar": "Buch - St. Magdalena"
},
"Rudersdorf Rudersdorf 3": {
"city": "Rudersdorf",
"calendar": "Rudersdorf 3"
},
"Lieboch": {
"city": "Lieboch",
"calendar": "Lieboch"
}
}
COUNTRY = "at"
ICON_MAP = {
"Restmüll": "mdi:trash-can",
"Biomüll": "mdi:leaf",
"Altpapier": "mdi:package-variant",
"Papier": "mdi:package-variant",
"Leichtfraktion": "mdi:recycle",
"Leichtverpackung": "mdi:recycle",
"Gelber": "mdi:recycle",
"Sonder-": "mdi:dump-truck",
"Abfallwirtschaftszentrum": "mdi:house",
"Strauchschnitt": "mdi:tree",
"Metallverpackung": "mdi:can",
}
class Source:
def __init__(self, city: str, calendar: str):
self._city: str = city
self._calendar: str = calendar
def fetch(self):
cities_apps = CitiesApps()
garbage_plans = cities_apps.fetch_garbage_plans(
self._city, self._calendar)
entries = []
for garbage_plan in garbage_plans:
bin_type = garbage_plan["garbage_type"]["name"]
icon = ICON_MAP.get(bin_type.split(" ")[0]) # Collection icon
for date_string in garbage_plan["dates"]:
date = datetime.strptime(date_string, "%Y-%m-%d").date()
entries.append(Collection(date=date, t=bin_type, icon=icon))
return entries

View File

@@ -0,0 +1,76 @@
from waste_collection_schedule.service.CitiesAppsCom import CitiesApps
import inquirer
import site
from pathlib import Path
package_dir = Path(__file__).resolve().parents[2]
site.addsitedir(str(package_dir))
app = CitiesApps()
def ask_city():
cities = app.get_cities()
cities.sort(key=lambda d: d['name'])
questions = [
inquirer.List("city",
choices=[(c["name"], c["_id"]) for c in cities], message="Select a city"
)
]
city_id = inquirer.prompt(questions)["city"]
city = [c["name"] for c in cities if c["_id"] == city_id][0]
return [city_id, city]
def ask_calendar(city_id, allow_search=True):
calendars = app.get_garbage_calendars(city_id)
if len(calendars) == 1:
print("# Only one calendar found, using that one")
cal = calendars[0]["name"]
else:
choices = [c["name"] for c in calendars]
choices.sort()
if allow_search:
choices = ["Search By Street", *choices]
questions = [
inquirer.List("cal", choices=choices, message="Select a calendar", default="Search By Street")
]
cal = inquirer.prompt(questions)["cal"]
return cal
def ask_by_street(city_id):
streets = app.get_streets(city_id)
if not streets["streets"]:
print("City does not support searching by street")
return ask_calendar(city_id, allow_search=False)
streetlist = streets["streets"]
streetlist.sort(key=lambda d: d['full_names'])
calendars = {s_cal["garbage_areaid"]: s_cal["name"] for s_cal in streets["calendars"]}
choices = [(" ".join(c["full_names"]), calendars[c["areaids"][0]]) for c in streetlist]
questions = [
inquirer.List("cal", choices=choices, message="Select a street")
]
return inquirer.prompt(questions)["cal"]
def main():
city_id, city = ask_city()
cal = ask_calendar(city_id)
if cal == "Search By Street":
cal = ask_by_street(city_id)
print(f"""waste_collection_schedule:
sources:
- name: citiesapps_com
args:
city: {city}
calendar: {cal}""")
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,236 @@
# App CITIES
Support for schedules provided by [App CITIES](https://citiesapps.com), serving App CITIES, Austria.
## Supported cities
<!--Begin of service section-->
|City|Website|
|-|-|
| Andau | [andau-gemeinde.at](https://www.andau-gemeinde.at) |
| Apetlon | [gemeinde-apetlon.at](https://gemeinde-apetlon.at) |
| Bad Blumau | [bad-blumau-gemeinde.at](https://bad-blumau-gemeinde.at) |
| Bad Gleichenberg | [bad-gleichenberg.gv.at](http://www.bad-gleichenberg.gv.at) |
| Bad Loipersdorf | [gemeinde.loipersdorf.at](https://gemeinde.loipersdorf.at) |
| Bad Radkersburg | [bad-radkersburg.gv.at](https://www.bad-radkersburg.gv.at) |
| Bad Tatzmannsdorf | [bad-tatzmannsdorf.at](http://www.bad-tatzmannsdorf.at) |
| Bildein | [bildein.at](http://www.bildein.at) |
| Breitenbrunn am Neusiedler See | [breitenbrunn.at](http://www.breitenbrunn.at) |
| Breitenstein | [breitenstein.at](https://www.breitenstein.at) |
| Bruckneudorf | [bruckneudorf.eu](http://www.bruckneudorf.eu) |
| Buch - St. Magdalena | [buch-stmagdalena.at](http://www.buch-stmagdalena.at) |
| Burgau | [burgau.info](https://www.burgau.info) |
| Dechantskirchen | [dechantskirchen.gv.at](https://dechantskirchen.gv.at) |
| Deutsch Goritz | [deutsch-goritz.at](https://www.deutsch-goritz.at) |
| Deutsch Jahrndorf | [deutsch-jahrndorf.at](https://www.deutsch-jahrndorf.at) |
| Deutsch Kaltenbrunn | [deutschkaltenbrunn.eu](https://www.deutschkaltenbrunn.eu) |
| Deutschkreutz | [deutschkreutz.at](https://www.deutschkreutz.at) |
| Dobl-Zwaring | [dobl-zwaring.gv.at](https://www.dobl-zwaring.gv.at) |
| Draßmarkt | [drassmarkt.at](http://www.drassmarkt.at) |
| Eberau | [eberau.riskommunal.net](https://eberau.riskommunal.net) |
| Eberndorf | [eberndorf.at](https://www.eberndorf.at) |
| Eberstein | [eberstein.at](https://www.eberstein.at) |
| Edelsbach bei Feldbach | [edelsbach.at](http://www.edelsbach.at) |
| Eggersdorf bei Graz | [eggersdorf-graz.gv.at](https://www.eggersdorf-graz.gv.at) |
| Eisenstadt | [eisenstadt.gv.at](https://www.eisenstadt.gv.at) |
| Fehring | [fehring.at](http://www.fehring.at) |
| Feistritz ob Bleiburg | [feistritz-bleiburg.gv.at](https://feistritz-bleiburg.gv.at) |
| Feldbach | [feldbach.gv.at](https://www.feldbach.gv.at) |
| Frankenau-Unterpullendorf | [frankenau-unterpullendorf.gv.at](https://www.frankenau-unterpullendorf.gv.at) |
| Frauenkirchen | [frauenkirchen.at](https://www.frauenkirchen.at) |
| Freistadt | [freistadt.at](https://www.freistadt.at) |
| Friedberg | [friedberg.gv.at](https://www.friedberg.gv.at) |
| Fürstenfeld | [fuerstenfeld.gv.at](https://www.fuerstenfeld.gv.at) |
| Gabersdorf | [gabersdorf.gv.at](https://www.gabersdorf.gv.at) |
| Gattendorf | [gattendorf.at](https://www.gattendorf.at) |
| Gols | [gols.at](https://www.gols.at) |
| Grafendorf bei Hartberg | [grafendorf.at](https://grafendorf.at) |
| Grafenstein | [grafenstein.gv.at](https://grafenstein.gv.at) |
| Gratkorn | [gratkorn.gv.at](https://www.gratkorn.gv.at) |
| Großwarasdorf | [grosswarasdorf.at](https://www.grosswarasdorf.at) |
| Großwilfersdorf | [grosswilfersdorf.steiermark.at](http://www.grosswilfersdorf.steiermark.at) |
| Gutenberg-Stenzengreith | [gutenberg-stenzengreith.gv.at](https://www.gutenberg-stenzengreith.gv.at) |
| Güssing | [guessing.co.at](https://www.guessing.co.at) |
| Hartberg | [hartberg.at](https://www.hartberg.at) |
| Heiligenkreuz am Waasen | [heiligenkreuz-waasen.gv.at](https://www.heiligenkreuz-waasen.gv.at) |
| Hofstätten an der Raab | [hofstaetten.at](https://www.hofstaetten.at) |
| Horitschon | [horitschon.at](http://www.horitschon.at) |
| Hornstein | [hornstein.at](https://www.hornstein.at) |
| Hüttenberg | [huettenberg.at](https://huettenberg.at) |
| Ilz | [ilz.at](https://www.ilz.at) |
| Jabing | [gemeinde-jabing.at](https://www.gemeinde-jabing.at) |
| Jagerberg | [jagerberg.info](http://www.jagerberg.info) |
| Kaindorf | [kaindorf.at](https://www.kaindorf.at) |
| Kaisersdorf | [kaisersdorf.com](http://www.kaisersdorf.com) |
| Kalsdorf bei Graz | [kalsdorf-graz.gv.at](https://www.kalsdorf-graz.gv.at) |
| Kapfenstein | [kapfenstein.at](http://www.kapfenstein.at) |
| Kirchberg an der Raab | [kirchberg-raab.gv.at](https://www.kirchberg-raab.gv.at) |
| Kleinmürbisch | [kleinmuerbisch.at](https://www.kleinmuerbisch.at) |
| Klingenbach | [klingenbach.at](https://klingenbach.at) |
| Klöch | [kloech.com](https://www.kloech.com) |
| Kohfidisch | [kohfidisch.at](http://www.kohfidisch.at) |
| Korneuburg | [korneuburg.gv.at](https://www.korneuburg.gv.at) |
| Laa an der Thaya | [laa.at](http://www.laa.at) |
| Leithaprodersdorf | [leithaprodersdorf.at](http://www.leithaprodersdorf.at) |
| Lieboch | [lieboch.gv.at](https://www.lieboch.gv.at) |
| Litzelsdorf | [litzelsdorf.at](https://www.litzelsdorf.at) |
| Loipersbach im Burgenland | [loipersbach.info](https://www.loipersbach.info) |
| Mariasdorf | [mariasdorf.at](https://www.mariasdorf.at) |
| Markt Hartmannsdorf | [markthartmannsdorf.at](https://www.markthartmannsdorf.at) |
| Markt Neuhodis | [markt-neuhodis.at](http://www.markt-neuhodis.at) |
| Marz | [marz.gv.at](https://www.marz.gv.at) |
| Mattersburg | [mattersburg.gv.at](https://www.mattersburg.gv.at) |
| Melk | [stadt-melk.at](https://www.stadt-melk.at) |
| Mettersdorf am Saßbach | [mettersdorf.com](http://www.mettersdorf.com) |
| Mischendorf | [mischendorf.at](https://www.mischendorf.at) |
| Mistelbach | [mistelbach.at](https://www.mistelbach.at) |
| Mitterdorf an der Raab | [mitterdorf-raab.at](https://www.mitterdorf-raab.at) |
| Mureck | [mureck.gv.at](https://www.mureck.gv.at) |
| Mörbisch am See | [moerbisch.gv.at](https://moerbisch.gv.at) |
| Neudorf bei Parndorf | [neudorfbeiparndorf.at](http://www.neudorfbeiparndorf.at) |
| Neufeld an der Leitha | [neufeld-leitha.at](https://www.neufeld-leitha.at) |
| Neusiedl am See | [neusiedlamsee.at](https://www.neusiedlamsee.at) |
| Nickelsdorf | [nickelsdorf.gv.at](https://www.nickelsdorf.gv.at) |
| Oberpullendorf | [oberpullendorf.gv.at](https://www.oberpullendorf.gv.at) |
| Oberwart | [oberwart.gv.at](https://www.oberwart.gv.at) |
| Oslip | [oslip.at](http://www.oslip.at) |
| Ottendorf an der Rittschein | [ottendorf-rittschein.steiermark.at](https://www.ottendorf-rittschein.steiermark.at) |
| Paldau | [paldau.gv.at](http://www.paldau.gv.at) |
| Pamhagen | [gemeinde-pamhagen.at](https://www.gemeinde-pamhagen.at) |
| Parndorf | [gemeinde-parndorf.at](http://www.gemeinde-parndorf.at) |
| Peggau | [peggau.at](https://peggau.at) |
| Pernegg an der Mur | [pernegg.at](http://pernegg.at) |
| Pilgersdorf | [pilgersdorf.at](https://www.pilgersdorf.at) |
| Pinggau | [pinggau.gv.at](https://www.pinggau.gv.at) |
| Pinkafeld | [pinkafeld.gv.at](https://www.pinkafeld.gv.at) |
| Podersdorf am See | [gemeindepodersdorfamsee.at](http://www.gemeindepodersdorfamsee.at) |
| Poggersdorf | [gemeinde-poggersdorf.at](https://gemeinde-poggersdorf.at) |
| Potzneusiedl | [potzneusiedl.at](https://www.potzneusiedl.at) |
| Poysdorf | [poysdorf.at](https://www.poysdorf.at) |
| Pöchlarn | [poechlarn.at](https://www.poechlarn.at) |
| Radmer | [radmer.at](https://www.radmer.at) |
| Ragnitz | [ragnitz.gv.at](https://www.ragnitz.gv.at) |
| Raiding | [raiding-online.at](https://www.raiding-online.at) |
| Rudersdorf | [rudersdorf.at](http://www.rudersdorf.at) |
| Rust | [freistadt-rust.at](https://www.freistadt-rust.at) |
| Saalfelden am Steinernen Meer | [stadtmarketing-saalfelden.at](https://www.stadtmarketing-saalfelden.at) |
| Sankt Oswald bei Plankenwarth | [sanktoswald.net](https://www.sanktoswald.net) |
| Schäffern | [schaeffern.gv.at](https://www.schaeffern.gv.at) |
| Schützen am Gebirge | [schuetzen-am-gebirge.at](https://www.schuetzen-am-gebirge.at) |
| Seiersberg-Pirka | [gemeindekurier.at](https://www.gemeindekurier.at) |
| Sigleß | [sigless.at](https://www.sigless.at) |
| Sinabelkirchen | [sinabelkirchen.eu](https://www.sinabelkirchen.eu) |
| St. Andrä | [st-andrae.gv.at](https://www.st-andrae.gv.at) |
| St. Anna am Aigen | [st-anna-aigen.gv.at](http://www.st-anna-aigen.gv.at) |
| St. Johann in der Haide | [st-johann-haide.gv.at](http://www.st-johann-haide.gv.at) |
| St. Lorenzen am Wechsel | [st-lorenzen-wechsel.at](https://www.st-lorenzen-wechsel.at) |
| St. Margarethen an der Raab | [st-margarethen-raab.at](https://www.st-margarethen-raab.at) |
| St. Margarethen im Burgenland | [st-margarethen.at](https://www.st-margarethen.at) |
| St. Peter - Freienstein | [st-peter-freienstein.gv.at](https://www.st-peter-freienstein.gv.at) |
| St. Peter am Ottersbach | [st-peter-ottersbach.gv.at](http://www.st-peter-ottersbach.gv.at) |
| St. Ruprecht an der Raab | [st.ruprecht.at](https://www.st.ruprecht.at) |
| St. Veit in der Südsteiermark | [st-veit-suedsteiermark.gv.at](https://www.st-veit-suedsteiermark.gv.at) |
| Stegersbach | [gemeinde.stegersbach.at](https://gemeinde.stegersbach.at) |
| Steinbrunn | [steinbrunn.at](https://www.steinbrunn.at) |
| Steuerberg | [steuerberg.at](https://www.steuerberg.at) |
| Stinatz | [stinatz.gv.at](http://www.stinatz.gv.at) |
| Stiwoll | [stiwoll.at](https://www.stiwoll.at) |
| Stockerau | [stockerau.at](http://www.stockerau.at) |
| Söchau | [soechau.steiermark.at](http://www.soechau.steiermark.at) |
| Thal | [thal.gv.at](https://thal.gv.at) |
| Tieschen | [tieschen.gv.at](https://www.tieschen.gv.at) |
| Tulln an der Donau | [tulln.at](https://www.tulln.at) |
| Unterfrauenhaid | [unterfrauenhaid.at](https://www.unterfrauenhaid.at) |
| Unterkohlstätten | [unterkohlstaetten.at](https://www.unterkohlstaetten.at) |
| Unterlamm | [unterlamm.gv.at](http://www.unterlamm.gv.at) |
| Vasoldsberg | [vasoldsberg.gv.at](https://www.vasoldsberg.gv.at) |
| Vordernberg | [vordernberg.steiermark.at](http://www.vordernberg.steiermark.at) |
| Völkermarkt | [voelkermarkt.gv.at](https://voelkermarkt.gv.at) |
| Weiz | [weiz.at](https://www.weiz.at) |
| Werfenweng | [gemeinde-werfenweng.at](http://www.gemeinde-werfenweng.at) |
| Wies | [wies.at](https://www.wies.at) |
| Wiesen | [wiesen.eu](https://www.wiesen.eu) |
| Wiesfleck | [gemeinde-wiesfleck.at](https://www.gemeinde-wiesfleck.at) |
| Wimpassing an der Leitha | [wimpassing-leitha.at](http://www.wimpassing-leitha.at) |
| Winden am See | [winden.at](https://www.winden.at) |
| Wolfsberg | [wolfsberg.at](https://www.wolfsberg.at) |
| Wolkersdorf im Weinviertel | [wolkersdorf.at](http://www.wolkersdorf.at) |
| Zagersdorf | [zagersdorf.at](http://www.zagersdorf.at) |
| Zillingtal | [zillingtal.eu](https://www.zillingtal.eu) |
| Zurndorf | [zurndorf.at](https://zurndorf.at) |
| Übelbach | [uebelbach.gv.at](https://www.uebelbach.gv.at) |
<!--End of service section-->
## Configuration via configuration.yaml
```yaml
waste_collection_schedule:
sources:
- name: citiesapps_com
args:
city: CITY
calendar: CALENDAR
```
### Configuration Variables
**city**
*(String) (required)*
**calendar**
*(String) (required)*
## Example
```yaml
waste_collection_schedule:
sources:
- name: citiesapps_com
args:
city: Fürstenfeld
calendar: Haushalt Altenmarkt
```
```yaml
waste_collection_schedule:
sources:
- name: citiesapps_com
args:
city: Buch - St. Magdalena
calendar: Buch - St. Magdalena
```
```yaml
waste_collection_schedule:
sources:
- name: citiesapps_com
args:
city: Rudersdorf
calendar: Rudersdorf 3
```
## How to get the source argument
### Easy with CITIES app
The easiest way to find the parameter of your address is using [CITIES app](https://citiesapps.com) directly:
- Select your city.
- Use the exact spelling like in the app for the city parameter.
- Open `Services`.
- Open `Garbage calendar`.
- You should now see the garbage calendar(s) use the exact spelling for the calendar parameter.
- If the names are not descriptive enough you mostly can search by address
- Open `Search via adress`.
- Select your details.
- You should now see in the left top corner the garbage calendar name above your selected address.
### More complicated with terminal wizard
If you do not want to install the app: The more complicated variant to get the parameter is by using the wizard at [custom_components/waste_collection_schedule/waste_collection_schedule/wizard/citiesapps_com.py](https://github.com/mampfes/hacs_waste_collection_schedule/blob/master/custom_components/waste_collection_schedule/waste_collection_schedule/wizard/citiesapps_com.py):
- Clone the repository: `git clone https://github.com/mampfes/hacs_waste_collection_schedule`
- Make sure inquirer is installed `pip install inquirer`
- Run the python script `python hacs_waste_collection_schedule/custom_components/waste_collection_schedule/waste_collection_schedule/wizard/citiesapps_com.py` or `python3 hacs_waste_collection_schedule/custom_components/waste_collection_schedule/waste_collection_schedule/wizard/citiesapps_com.py`. Windows: `python hacs_waste_collection_schedule\custom_components\waste_collection_schedule\waste_collection_schedule\wizard\citiesapps_com.py`

File diff suppressed because one or more lines are too long

View File

@@ -118,6 +118,7 @@ def browse_sources():
update_awido_de(modules)
update_ctrace_de(modules)
update_citiesapps_com(modules)
return sources
@@ -283,6 +284,22 @@ def update_ctrace_de(modules):
_patch_file("doc/source/c_trace_de.md", "service", str)
def update_citiesapps_com(modules):
module = modules.get("citiesapps_com")
if not module:
print("citiesapps_com not found")
return
services = getattr(module, "SERVICE_MAP", [])
str = "|City|Website|\n|-|-|\n"
for service in sorted(
services, key=lambda service: service["title"]
):
str += f'| {service["title"]} | [{beautify_url(service["url"])}]({service["url"]}) |\n'
_patch_file("doc/source/citiesapps_com.md", "service", str)
def _patch_file(filename, section_id, str):
# read entire file
with open(filename) as f: