A book auto-renewer for UNI's library

A while ago I wrote an auto renewer for UNI's library. I thought I would share that code in this post. It's not the best code I've ever written, but it works, and it's much better then trying to remember to do it manually.

So, without further ado, get it.

It's pretty simple to run, basically you just do

  1. ruby rod_library_renewer.rb last_name UNI_id_including_000_in_the_front

The default action as demo'd above is to renew all books. I set this on up on my system using cron to run every day.

This will almost certainly fail if someone reserves one of the books you have..but I don't know how the web interface reports this, so my script doesn't catch it. So. Be aware!