Skip to content

Keeps texting you about Canvas assignments if you haven't submitted them before a deadline.

License

Notifications You must be signed in to change notification settings

smalldrew/canvas-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Canvas Notifier

About

Canvas Notifier is a Python script that texts you as the assignment gets closer if you haven't submitted.
Diagram

Sample Text:
Text Message

Tragic Backstory

I had an assignment that I was about to do and then forgot until 10 minutes before.

My live reaction 10 minutes before:
My Reaction

Setup

Credentials

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)

Gmail Texting Setup

Follow this guide to get your credentials for texting via Gmail servers.

ENV Method

add this .env file to src/util:

EMAIL=INSERT_YOUR_EMAIL 
PASSWORD=INSERT_YOUR_PASSWORD
PHONE_NUMBER=PHONE_NUMBER_TO_SEND_ALERTS_TO

Edit Code Variables Method

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

Canvas API Setup

Follow this guide to get your developer key

ENV Method

add this .env in the scope of canvas.py:

CANVAS_API_TOKEN=INSERT_YOUR_TOKEN

Edit Code Variable Method

edit this variable in canvas.py:

CANVAS_API_TOKEN = 'INSERT YOUR TOKEN HERE'  # Your Canvas API token

Hosting

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!

TODO

  • Make it work
  • Refactor (lol)
  • Fix some assignment checking bugs
  • Finish Canvas refresh token feature (for more security)

What I learned

  • 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

FAQ

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.

About

Keeps texting you about Canvas assignments if you haven't submitted them before a deadline.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages