Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/okainov/munich-scripts
Some useful scripts simplifying bureaucracy
https://github.com/okainov/munich-scripts
appointment germany hacktoberfest munich python scraper simple telegram
Last synced: about 5 hours ago
JSON representation
Some useful scripts simplifying bureaucracy
- Host: GitHub
- URL: https://github.com/okainov/munich-scripts
- Owner: okainov
- License: mit
- Created: 2017-11-15T22:14:12.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-13T15:00:15.000Z (about 1 year ago)
- Last Synced: 2024-12-24T04:44:09.248Z (3 days ago)
- Topics: appointment, germany, hacktoberfest, munich, python, scraper, simple, telegram
- Language: Python
- Homepage:
- Size: 97.7 KB
- Stars: 198
- Watchers: 9
- Forks: 34
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# General
Some useful scripts simplifying bureaucracy, especially when living in Munich, Germany.# termin_api.py
Small tool to show availability of appointments in different Departments of Munich.Available departments are:
- [Ausländerbehörde](https://www.muenchen.de/rathaus/Stadtverwaltung/Kreisverwaltungsreferat/Auslaenderwesen.html) (foreign nationals affairs, residence permits, work visas etc.)
- [Bürgerbüro](https://www.muenchen.de/rathaus/Stadtverwaltung/Kreisverwaltungsreferat/Buergerbuero.html) (civil affairs, residence registration etc.)
- [Führerscheinstelle](https://www.muenchen.de/rathaus/Stadtverwaltung/Kreisverwaltungsreferat/Verkehr/Fuehrerschein.html) (driver license affairs)
- [Kfz-Zulassungstelle](https://www.muenchen.de/rathaus/Stadtverwaltung/Kreisverwaltungsreferat/Verkehr/KFZ-Zulassung.html) (motor vehicles affairs, registration, license plate and so on)
- [Versicherungsamt](https://www.muenchen.de/rathaus/Stadtverwaltung/Kreisverwaltungsreferat/Versicherungsamt.html) (Pension-related stuff, i.e. getting information about your contribution, necessary for NE)Please note the script **does not perform appointment booking** (see [#4](https://github.com/okainov/munich-scripts/issues/4)), it just tells you current status and allows you to subscribe to a notifier for one week.
## Telegram bot
There is a Telegram bot at [@MunichTerminBot](https://t.me/MunichTerminBot) using `termin_api.py` functionality. The bot is written using [python-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot) library. Source code is also in this repo, `tg_bot.py`.
### Development
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 deployment
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.
#### Manual deployment
Pre-requisites:
- `TG_TOKEN` environment variable is set in `.env` file
If you want to enable Elastic statistics, then additionally set following variables to non-empty value:
- `ELASTIC_HOST` - hostname where ELK stack is deployed
- `ELASTIC_USER` - ElasticSearch username
- `ELASTIC_PASS` - ElasticSearch passwordCommands for manual deploy
git pull
docker-compose build
docker-compose up -d
Shortly after deploy make sure everything is runningdocker-compose logs -f
## Script usage
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