Canvas Notifier is a Python script that texts you as the assignment gets closer if you haven't submitted.
I had an assignment that I was about to do and then forgot until 10 minutes before.
My live reaction 10 minutes before:
First, you'll need to set up credentials stuff (for texting and Canvas API).
I set it up with multiple .env files (there's probably a better way to do it) but you could also alter
the variables inside the code. (methods shown below)
Follow this guide to get your credentials for texting via Gmail servers.
add this .env file to src/util
:
EMAIL=INSERT_YOUR_EMAIL
PASSWORD=INSERT_YOUR_PASSWORD
PHONE_NUMBER=PHONE_NUMBER_TO_SEND_ALERTS_TO
edit these variables found in src/util/sms.py
:
EMAIL = 'PUT YOUR EMAIL HERE' # email to send via
PASSWORD = 'PUT YOUR PASSWORD HERE' # special auth password for email above
PHONE_NUMBER = 'PUT YOUR PHONE NUMBER HERE' # phone number to send texts to
Follow this guide to get your developer key
add this .env in the scope of canvas.py
:
CANVAS_API_TOKEN=INSERT_YOUR_TOKEN
edit this variable in canvas.py
:
CANVAS_API_TOKEN = 'INSERT YOUR TOKEN HERE' # Your Canvas API token
I used a cron job on an ec2 instance that just checks Canvas every minute.
Get 1 year free of AWS (not sponsored)
The following commands are only UNIX based machines (sorry windows users)
1. cd
into /src:
cd canvas-notifier/src/
2. install needed packages:
pip install -r requirements.txt
3. adjust permissions of python file with chmod
:
chmod +x main.py
4. edit crontab:
crontab -e
5. put this in your crontab thing (with respective Python and main.py paths):
* * * * * /usr/bin/python3 /home/ec2-user/canvas-notifier/src/main.py
6. enjoy!
- Make it work
- Refactor (lol)
- Fix some assignment checking bugs
- Finish Canvas refresh token feature (for more security)
- using cronjobs
- making a free ec2 instance (thanks bezos)
- building a simple project with Python
- you can text for free on gmail servers
- making a decent readme
Q: Why AWS?
A: Beacuse it was free (thanks bezos)
Q: Is this practical?
A: kind of?
Q: Does this use AI?
A: unfortunately, no.