Reply to comment

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!

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <java>, <javascript>, <php>, <rails>, <ruby>, <scheme>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
1 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.