Alerts for Western Australian Covid-19 exposure locations via email and Slack

Overview

WA Covid Mailer

Sends alerts from Healthy WA's Covid19 Exposure Locations via email and slack.

Setup

Edit the configuration items in wacovidmailer.py

# Database location
db_file = "/path/to/exposures.db" # will be created on first use

# Email details
emailAlerts = True
smtpServ = ""
smtpPort = ""
fromAddr = ""
replyAddr = ""
destAddr = ["[email protected]", "[email protected]"]
subjLine = f"Alert: Updated WA covid-19 exposure sites ({date_time})"

# Slack Alerts
slackAlerts = True
webhook_urls = ["https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXX"] # slack webhook 1
webhook_urls = webhook_urls + ["https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXX"] # slack webhook 2

### END OF CONFIGURATION ITEMS

Install your deps

pip3 install requests lxml sqlite3

Setup your cronjob

*/30 * * * * /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.

CC BY-NC-SA 4.0

Comments
  • [Question] Possibility of exposing the db as an API?

    [Question] Possibility of exposing the db as an API?

    Possibility of exposing the db you're using for emails as an API?

    Wanted to try and knock up a slightly more user friendly site for the data and an API would be a great way to just stand up a netlify/github pages/serverless frontend.

    Obviously understand if you're looking to keep it lean and low cost, in which case i'll just stand up a server 😁

    opened by dbetteridge 4
  • Fully Parsing Exposure Sites

    Fully Parsing Exposure Sites

    Fully Parsing Exposure Sites

    Purpose

    This fork was made to properly parse the start times, end times, and locations of COVID-19 exposures in WA. The idea is people could also use it as a Python module to process exposures themselves for any purpose (for example mapping) as opposed to just notifications, and notifications would be able to be formatted more consistently.

    Changes

    Basically what has changed is

    • The project has been split into three separate files and mostly rewritten
      • One contains classes and tools for exposure sites (exposure_tools.py)
      • Another parses exposure sites using these tools (exposure_parser.py)
      • And the third stores these sites in a database and sends new exposures to Discord (discord_notify.py)
    • Exposure notifications should now use the Exposure class of exposure_tools.py to have a standardised format
    • All notification outputs other than Discord webhooks have been removed (that was all I needed, but the others can be re-implemented fairly easily)
    • The Curtin University exposure function isn't called anymore because the table has been removed from the website

    Other

    This isn't so much related to the pull request but something I would have tried to do later: I'm not sure what the process is, but it could be an idea to try add the module to PyPI so that it could be used more effectively as a module. The notification script could be used as a script within the package and exposure_parser.py could be used to get exposure sites and process them in Python

    opened by Aurillium 3
  • Add Discord support

    Add Discord support

    Add support via Discord's webhook API Note that Discord only allows messages up to 2000 characters, so I've configured it to split by each exposure notification and post individually with a 2 second delay to hopefully avoid rate limits. In my testing, a first time run will attempt to post ~200 messages and get rate limited by Discord's API, but additions to the exposure list seem fine. I'd recommend not enabling Discord until you've run at least once and created the database.

    opened by samwakel 2
  • Added columns and formatting

    Added columns and formatting

    New columns: first_seen and last_seen for entries that disappear or to show when they were last seen.

    Also updated formatting for multiple line breaks, line breaks at the start of entries, and tidied up flow so fields only need to get cleaned once.

    opened by GwynHannay 0
  • Fixed discord / other things with max alert length

    Fixed discord / other things with max alert length

    Added a method to chunk to the nearest alert ending; can be modified to change delimeter or max length as needed but defaults work with discord's 2k limit.

    opened by swarley7 0
Owner
null
With the initiation of the COVID vaccination drive across India for all individuals above the age of 18, I wrote a python script which alerts the user regarding open slots in the vicinity!

cowin_notifier With the initiation of the COVID vaccination drive across India for all individuals above the age of 18, I wrote a python script which

null 13 Aug 1, 2021
Ontario-Covid-Screening - An automated Covid-19 School Screening Tool for Ontario

Ontario-Covid19-Screening An automated Covid-19 School Screening Tool for Ontari

Rayan K 0 Feb 20, 2022
A Google sheet which keeps track of the locations that want to visit and a price cutoff

FlightDeals Here's how the program works. First, I have a Google sheet which keeps track of the locations that I want to visit and a price cutoff. It

Lynne Munini 5 Nov 21, 2022
GWCelery is a simple and reliable package for annotating and orchestrating LIGO/Virgo alerts

GWCelery is a simple and reliable package for annotating and orchestrating LIGO/Virgo alerts, built from widely used open source components.

Min-A Cho Zeno 1 Nov 2, 2021
This alerts you when the avalanche score a goal

This alerts you when the avalanche score a goal

Davis Burrill 1 Jan 15, 2022
To check my COVID-19 vaccine appointment, I wrote an infinite loop that sends me a Whatsapp message hourly using Twilio and Selenium. It works on my Raspberry Pi computer.

COVID-19_vaccine_appointment To check my COVID-19 vaccine appointment, I wrote an infinite loop that sends me a Whatsapp message hourly using Twilio a

Ayyuce Demirbas 24 Dec 17, 2022
Simple and easy to use python API for the COVID registration booking system of the math department @ unipd (torre archimede)

Simple and easy to use python API for the COVID registration booking system of the math department @ unipd (torre archimede). This API creates an interface with the official browser, with more useful functionalities.

Guglielmo Camporese 4 Dec 24, 2021
Howell County, Missouri, COVID-19 data and (unofficial) estimates

COVID-19 in Howell County, Missouri This repository contains the daily data files used to generate my COVID-19 dashboard for Howell County, Missouri,

Jonathan Thornton 0 Jun 18, 2022
🦠 A simple and fast (< 200ms) API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak.

?? A simple and fast (< 200ms) API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. It's written in python using the ?? FastAPI framework. Supports multiple sources!

Marius 1.6k Jan 4, 2023
Covid-19-Trends - A project that me and my friends created as the CSC110 Final Project at UofT

Covid-19-Trends Introduction The COVID-19 pandemic has caused severe financial s

null 1 Jan 7, 2022
🌍💉 Global COVID-19 vaccination data at the regional level.

COVID-19 vaccination data at subnational level. To ensure its officiality, the source data is carefully verified.

sociepy 61 Sep 21, 2022
Repositorio com arquivos processados da CPI da COVID para facilitar analise

cpi4all Repositorio com arquivos processados da CPI da COVID para facilitar analise Organização No site do senado é possivel encontrar a lista de todo

Breno Rodrigues Guimarães 12 Aug 16, 2021
COVID-19 case tracker in Dash

covid_dashy_personal This is a personal project to build a simple COVID-19 tracker for Australia with Dash. Key functions of this dashy will be to Dis

Jansen Zhang 1 Nov 30, 2021
We are building an open database of COVID-19 cases with chest X-ray or CT images.

?? Note: please do not claim diagnostic performance of a model without a clinical study! This is not a kaggle competition dataset. Please read this pa

Joseph Paul Cohen 2.9k Dec 30, 2022
Python NZ COVID Pass Verifier/Generator

Python NZ COVID Pass Verifier/Generator This is quick proof of concept verifier I coded up in a few hours using various libraries to parse and generat

NZ COVID Pass Community 12 Jan 3, 2023
Vaksina - Vaksina COVID QR Validation Checker With Python

Vaksina COVID QR Validation Checker Vaksina is a general purpose library intende

Michael Casadevall 33 Aug 20, 2022
Ontario-Covid19-Screening - An automated Covid-19 School Screening Tool for Ontario

Ontario-Covid19-Screening An automated Covid-19 School Screening Tool for Ontari

Rayan K 0 Feb 20, 2022
This Python3 script will monitor Upwork RSS feed and then email you the results.

Upwork RSS Parser This Python3 script will monitor Upwork RSS feed and then email you the results. Table of Contents General Info Technologies Used Fe

Chris 5 Nov 29, 2021
Push a record and you will receive a email when that date

Push a record and you will receive a email when that date

null 5 Nov 28, 2022