Skip to content

Program that checks Github and texts you to make sure you get that sweet sweet green commit chart

License

Notifications You must be signed in to change notification settings

smalldrew/did-you-code-today

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Canvas Notifier

About

  • Program that checks Github to make sure you get that sweet sweet green commit chart.

  • Sends a text message if you haven't pushed to Github in the past day

Sample Text Notifications (can be edited):

You coded
good text

You didn't code :/
bad text

Why

Meme

  • establish your superiority over other programmers
  • place all of your self worth onto a contribution graph
  • more green in the world

Setup

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

Hosting

I used a cron job on an ec2 instance that just checks Github every day at 10pm.

Get 1 year free of AWS (not sponsored)

NOTE: You could also run this locally

The following commands are only UNIX based machines (sorry windows users)

1. cd into /src:

cd did-you-code-today/src/

2. install needed packages:

pip install -r requirements.txt

3. adjust permissions of python file with chmod:

chmod +x github_scraper.py

4. edit crontab:

crontab -e

5. put this in your crontab thing (with respective paths):

0 22 * * * /usr/bin/python3 /home/ec2-user/did-you-code-today/src/

6. enjoy!

What I learned

  • webscraping with BeautifulSoup (python library)
  • don't waste your time with the Github API (haha)
  • green graph == good

FAQ

Q: Why AWS?
A: Beacuse it was free (thanks bezos)

Q: Is this practical?
A: Yes

Q: Does this use AI?
A: unfortunately, no.

About

Program that checks Github and texts you to make sure you get that sweet sweet green commit chart

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages