This Node.js script will fetch the books you currently have checked out at the library and convert their due dates into Reminders.app reminders. The script will update reminders when due dates have been changed (renewal), and create reminders for new checkouts.
I've tested it with the Brooklyn Public Library (my local library!) but it should work with any library that uses BiblioCommons as their catalog provider (e.g. their URL looks like http://[library name].bibliocommons.com/
);
I go thru seasons of being a delinquent Brooklyn Public Library patron. While the library will send me an email when a book's due date is approaching, I've found that often this gets lost in the infinite void of email. The script is based on the premise that the notifications generated by using Apple's Reminders (for Mac & iOS) are fundamentally more annoying than just getting email, and therefore more likely prompt my timely return of any given library book.
Unfortunately, this is Mac-only as it uses AppleScript. I looked into using CalDav to make it OS-independent, but Apple's CalDav interface very opaque.
You'll also need CasperJS, "an open source navigation scripting & testing utility". The easiest way to install is by using Homebrew, the OS X package manager. With homebrew installed, do this:
brew install casperjs
Then install the npm package globally (may require sudo):
npm install -g duedate
Usage: duedate [options]
Options:
-u, --username library username or barcode [required]
-p, --pin library pin
--library BiblioCommons key, http://[key].bibliocommons.com/ [default: "brooklyn"]
--title title of the Reminders list [default: "Brooklyn Public Library"]
--install install this script to check due dates once per day [default: false]
You can supply the PIN in the prompt:
$ duedate -u my_username -p 1234
Updated: 'Private Empire' is due
Or for the PIN sheepish, the PIN will be prompted-for:
$ duedate -u my_username
Enter your library PIN: ****
Updated: 'Private Empire' is due
The result: