Some useful scripts simplifying bureaucracy
Some useful scripts simplifying bureaucracy, especially when living in Munich, Germany.
Small tool to show availability of appointments in different Departments of Munich.
Available departments are:
Please note the script does not perform appointment booking (see #4), it just tells you current status and allows you to subscribe to a notifier for one week.
There is a Telegram bot at @MunichTerminBot using termin_api.py
functionality. The bot is written using python-telegram-bot library. Source code is also in this repo, tg_bot.py
.
By default bot runs as webhook configured for personal web server. For local development it's easier to use polling. In order to get it, just set DEBUG = True
in one of first lines of the script.
Bot is hosted on personal web server, running in Docker and automatic deploy from master
branch of this repo is set, no action should be required.
Pre-requisites:
TG_TOKEN
environment variable is set in .env
fileIf you want to enable Elastic statistics, then additionally set following variables to non-empty value:
ELASTIC_HOST
- hostname where ELK stack is deployedELASTIC_USER
- ElasticSearch usernameELASTIC_PASS
- ElasticSearch passwordCommands for manual deploy
git pull
docker-compose build
docker-compose up -d
Shortly after deploy make sure everything is running
docker-compose logs -f
Edit script content and select what type of appointments you actually need:
appointments = get_termins(DMV, 'FS Umschreibung Ausländischer FS')
# appointments = get_termins(CityHall, 'An- oder Ummeldung - Einzelperson')
# appointments = get_termins(ForeignLabor, 'Niederlassungserlaubnis Blaue Karte EU')
Run the script
python3 termin_api.py
Output will be printed in the console