Alerts for Western Australian Covid-19 exposure locations via email and Slack
WA Covid Mailer
Sends alerts from Healthy WA’s Covid19 Exposure Locations to via email, slack, and dreamhost announce lists.
Setup
Edit the configuration items in wacovidmailer.py
### CONFIGURATION ITEMS ###
# Debug mode disables sending of alerts
debug = True
# Database location
db_file = "/path/to/exposures.db" # will be created on first use
# Email details
emailAlerts = False
smtpServ = ""
smtpPort = ""
fromAddr = ""
replyAddr = ""
subjLine = f"Alert: Updated WA covid-19 exposure sites ({date_time})"
destAddr = [
"email1@example.com",
"email2@example.com"
]
# Slack Alerts
slackAlerts = False
webhook_urls = [
"https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXX",
"https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXX"
]
# Dreamhost Announce
dreamhostAnounces = False
apiKey = ""
listDomain = ""
listName = ""
subjLine = f"Alert: Updated WA covid-19 exposure sites ({date_time})"
### END OF CONFIGURATION ITEMS
Install your deps
pip3 install requests lxml sqlite3 pytz
Setup your cronjob
*/15 * * * * /usr/bin/python3 /path/to/wacovidmailer.py > /dev/null 2>&1
License
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.