kalmi / omikk-bot

Unofficial BME OMIKK library loan expiration notificator bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BME OMIKK library loan expiration notificator bot

An (unofficial) bot that notifies you via e-mail when your BME OMIKK library loans are about to expire soon.

This bot scrapes the library's web interface using your credentials daily, and sends you a mail each day when your closest expiry is in less than one week.

One can stop the notifications by clicking unsubscribe link in any notification mail. This completly removes them from the system.

My setup

Heroku

I run it on Heroku for free.

It should be fairly straightforward to deploy on Heroku.

I trigger the daily check&send from some other machine using a cron job: ´wget .../random_secret1´

The app needs the following env variables:

  • TZ (Europe/Budapest)
  • DATABASE_URL (I use the uri generated by the Heroku Postgres install)
  • BOT_USER_AGENT
  • DAILY_TRIGGER_URL (/random_secret1)
  • SEND_GRID_EVENT_URL (/random_secret2)
  • SENDGRID_USERNAME (Installing SendGrid autosets this)
  • SENDGRID_PASSWORD (Installing SendGrid autosets this)
  • SOURCE_EMAIL

SendGrid

The Subscription Tracking and Event Notification "Apps" are integrated with this app.

Event Notification needs to be setup to send "Unsubscribed From" events using the old POST method to ´.../random_secret2´.

Usage

Do all the setup, and navigate to .../register, and let your senses guide you.

Sample e-mail

Hátralévő napok a következő lejáratig: 7 (2014-05-09)
    - OMIKK Lejárat Figyelő

Ha nem szeretnél több ilyen értesítőt kapni, akkor kattins ide.

Hosted version

I run this at omikk.mooo.com

To use the hosted version, register here: http://omikk.mooo.com/register

This service is run on a best effort basis. If I am aware of any issues preventing it from sending out notfications, I will let you all know via email. If I am not aware of it, well, too bad. You hereby agree that I can't held liable...

Track record of the hosted version

Well, it has been running fine for over a year now. Except... when my cron jobs did not run for a while, because my password expired on that box, and I had no idea that expired password would prevent the cron jobs from running. Now I know, and I will no longer ignore password expiration notification e-mails...

I receive and check the log from the daily runs.

License

The whole project is licensed under MIT license.

About

Unofficial BME OMIKK library loan expiration notificator bot


Languages

Language:Python 100.0%