Based on your electoral district, automatically emails your elected representatives
represent.opennorth.ca provides name and contact information for elected officials in Canada based on your location. Since this already exists, we can use their API to easily get this info instead of searching for it ourselves. Initial research showed that nothing on this level (of ease of use) exists for the USA, so we will just focus on Canada.
Given a text file conataining the email body and an address/geolocation, our hack will compile a list of elected officials and send out the same email (individually addressed to each representative). It will be simplest to call the program from the command line.
- Add a UI that makes it easier/more convenient to use
- Remove the email composition step! Based on a topic (police reform, increased property taxes, ect) and a stance (for or against), autogenerate the email text for the user.
To run, this first involves setting up credentials to access a Gmail account through the Gmail API. After this is set up, create/activate a python virtual environment. Install the dependencies in requirements.txt and run the following:
python main.py
Follow the prompts to open a web browser, and fill in the corresponding fields on the form. When submitted, this will email your representatives and you should see the emails in the sent folder of the email account you set this up with.