Within the first week of (almost) every month, a new chapter of Shingeki no Kyojin is posted on r/ShingekiNoKyojin
This app sends me an email alert whenever that happens
Shingeki no Kyojin (also known as Attack on Titan) is an immensely popular Japanese manga series written and illustrated by Hajime Isayama. It has been adapted for an anime series of the same name who's 4th and final season will be released in Dec, 2020. Read the official wiki to know more
-
Get the latest post by u/SNKBot using the Reddit API
-
Run 3 checks on the post:
- Post's title matches the title of previous latest chapter posts
- Post has the
Latest Chapter
flair - Post has not been detected by this program previously (to avoid spamming email recepients every 2 minutes)
-
If all checks pass it sends the email and adds the post to a database
-
Run
git clone https://github.com/notadilnaqvi/snk-alert.git
-
Then run
heroku create
. This will create a new app visible on your Heroku dashboard. Open the app and go to the Resources tab -
From here, disable the default
web
dyno and add and enable aworker
dyno -
Now go to the Settings tab and add the following environment variables:
- GMAIL_USER : your Gmail ID
- GMAIL_PASSWORD : your Gmail password
- GMAIL_RECEPIENT : receient's Email ID
- GMAIL_CC : Email ID to cc the Email to
- DB_USER : MongoDB user ID
- DB_PASSWORD : MongoDB password
-
Run
git push heroku master
. Your app should now be up and running -
Run
heroku logs --tail
to see the latest logs
-
Run
git clone https://github.com/notadilnaqvi/snk-alert.git
. This downloads the this repository on your machine -
Then run
npm install
. This downloads all the npm packages needed to run this Node app. This might take sometime depending on your internet connection -
Inside the snk-alert folder, make a .env file. Open this file and add the following environment variables:
- GMAIL_USER = your Gmail ID
- GMAIL_PASSWORD = your Gmail password
- GMAIL_RECEPIENT = receient's Email ID
- GMAIL_CC = Email ID to cc the Email to
- DB_USER = MongoDB user ID
- DB_PASSWORD = MongoDB password
-
Now run
node app.js
. Your app should now be up and running
Because.