A simple project to notify users about upcoming exam for the Bavarian Fishing Exams.
- Create a GMX or mailersend account (mails will be send from this account)
- Create a spreadsheet with the following headers:
Zeitstempel
-> Values of the form:DD.MM.YYYY HH:MM:SS
E-Mail-Adresse
An- oder Abmeldung?
-> Valid values:Anmeldung / Aktualisierung
,Abmeldung
Nur bestimmte Regierungsbezirke?(Standard: Alle)
- Expose the following env variables:
GSHEET_SPREADSHEET_ID
: The ID of the Google Sheet (can be extracted from the spreadsheet’s url), e.g.1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms
GMAP_API_KEY
: The API Key for Google Maps to determine the distance between user and examSUBSCRIBE_URL
: The URL to subscribe to the service, e.g.https://fishing-exam-alert.herokuapp.com/subscribe
UNSUBSCRIBE_URL
: The URL to subscribe to the service, e.g.https://fishing-exam-alert.herokuapp.com/unsubscribe
MAIL_SERVICE
: The name of the mail service to use, e.g.GMX
ormailersend
NOTIFY_MAIL_FROM
: The mail address for the Mail account, e.g. test@gmx.deNOTIFY_MAIL_PASSWORD
: The password for the Mail account (formailersend
the API Key)
- Run the script with
python fishing_exam_alert/main.py
-
In each run it gets all entries from a Google Spreadsheet and checks if the record is valid for notifications.
-
If there are any valid records, it scraps and parses the fishing exam website.
-
Iterate over each valid record and apply the filters. If there are any matched exams, it sends a notification to the user.
Activate POP3 & IMAP
in GMX. Instructions are here.