THE SNIPER REPO HAS MOVED TO https://github.com/Rui-Zhang1997/sniper
Sniper is an application that interfaces with the Rutgers Schedule of Classes and notifies users via email/text when a course opens up.
It uses
- Flask for the application framework
- SQLAlchemy for ORM
- Requests for interfacing with the Rutgers Schedule of Classes.
- SendGrid for email notifications.
You can check out the live version if you want to simply use its functionality
You can setup an instance of sniper on your own Linux machine.
- Start by setting up a python virtualenv
- Install the python packages in
requirements.txt
by runningpip install -r requirements.txt
. - Create a
db/
directory in thesniper
folder (alongsideapp.py
). - Create empty database tables by running
python -c "from models import db; db.create_all()"
- Copy
secrets-example.py
tosecrets.py
. Edit the mail_username and mail_password fields to your SendGrid account details (if you want sniper to send you email). - Run app.py
python app.py
. You should be able to visithttp://localhost:5000/
and input a class to snipe.
When you input a snipe, you should see it under db/production.db
in the user and snipe tables.
If you run cron.py (python cron.py
), all the courses in the database will be checked and the corresponding users will be notified if the class is open.
You can run cron.py in a cronjob to automatically check for course openings.
Example: Put */15 * * * * /path/to/virtualenv/bin/python cron.py
into crontab -e
to automatically check for openings every 15 minutes.