This code notifies hackspace member on day $x via IRC (that they should put the garbage bin outside) if the garbage is fetched on day $x+1. EAD is responsible for fetching the garbage in Darmstadt. They provide an email notification service.
- Register on https://www.muellmax.de/abfallkalender/ead/res/EadStart.php?login and add your street
- Now you will get a mail the day before the collection of the garbage
- The script fetches the last 5 emails (imap) and checks the subject
- Via regex we will get something like this: Freitag, 02.08.2019 Wertstoffe
- On 01.08.2019 (the day before collection) we will write a message to notify the space member
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
mv settings.yaml.template settings.yaml
adjust settings.yaml
python garbage-announce.py
Check settings.yaml.template. Via daily_jobs you can specify when the emails will be fetched.
Guten Tag Frau ok,
wir erinnern Sie an die Termine der Müllabfuhr.
64283 Darmstadt - Innenstadt, Wilhelminenstraße 1-35, 2-10
- Freitag, 02.08.2019 Wertstoffe
Diese Erinnerungsmail wurde am Donnerstag, 01.08.2019 - 06:00:01 versendet.
Entsprechend der Auswahl in Ihrem Infomail Eintrag erfolgt der Versand mit
Option 1: am Tag vor der Abfuhr (Standard).
...
- go to https://webirc.hackint.org/
- use the username you want to use
- /msg NickServ REGISTER yourpassword yourmail@adomain.de
- You will get a mail with a command like this: /msg NickServ VERIFY REGISTER somesecret
- Now if someone uses your nick you can kick him with: /msg NickServer GHOST . Then /nick to switch.
adduser cda-garbage
# deactivate password
passwd -d cda-garbage
chmod 600 settings.yaml
chown -R cda-garbage: .
mv garbage-announce.service /etc/systemd/system
systemctl daemon-reload
systemctl start garbage-announce.service
# check if it runs
journalctl -f -u garbage-announce.service
systemctl enable garbage-announce.service