diff --git a/README.md b/README.md index 63cc652..5e86ba5 100644 --- a/README.md +++ b/README.md @@ -19,3 +19,7 @@ Steps to deploy (a copy of) this bot include - get a [Telegram bot token](https://core.telegram.org/bots#creating-a-new-bot) - create a config file: `mv config.ini.example config.ini` and configure the token in it - run the bot: `uv run src/zh_trashbot/bot.py` + +## VSCode setup + +Recommended extensions are Python language support and Code Spell Checker. diff --git a/cspell.config.yaml b/cspell.config.yaml new file mode 100644 index 0000000..440d9a5 --- /dev/null +++ b/cspell.config.yaml @@ -0,0 +1,16 @@ +version: "0.2" +ignorePaths: + - .venv +dictionaryDefinitions: [] +dictionaries: [] +words: + - Cattaneo + - trashbot + - venv + - Züri +ignoreWords: + - cargotram + - etram + - levelname + - tada +import: [] diff --git a/pyproject.toml b/pyproject.toml index f2b9252..edd49e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,10 +13,10 @@ dependencies = [ readme = "README.md" license = {file = "LICENSE.txt"} authors = [ - {name = "romanc"} + {name = "Roman Cattaneo"} ] maintainers = [ - {name = "romanc"} + {name = "Roman Cattaneo"} ] keywords = ["Züri", "telegram", "bot", "waste", "trash", "collection", "recycling"] classifiers = [ diff --git a/src/zh_trashbot/bot.py b/src/zh_trashbot/bot.py index dacebfc..507a2fe 100644 --- a/src/zh_trashbot/bot.py +++ b/src/zh_trashbot/bot.py @@ -176,11 +176,11 @@ def queryCollectionAPI(choice, user_data): today = datetime.today().strftime('%Y-%m-%d') baseurl = "http://openerz.metaodi.ch/api/calendar.json" - openerz = "%s?sort=date&types=%s&zip=%s&start=%s" % (baseurl, choice, + openERZ = "%s?sort=date&types=%s&zip=%s&start=%s" % (baseurl, choice, zip, today) - openerz += "&limit=0" if limit == "none" else "&limit=%s" % limit + openERZ += "&limit=0" if limit == "none" else "&limit=%s" % limit - with urllib.request.urlopen(openerz) as url: + with urllib.request.urlopen(openERZ) as url: data = json.loads(url.read().decode()) count = data['_metadata']['total_count'] if count == 0: