duedate

0.0.2 • Public • Published

duedate

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/);

Background

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.

Installation

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

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]

Brooklyn Public Library examples

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:

screen shot 2013-11-03 at 11 53 00 am

Readme

Keywords

none

Package Sidebar

Install

npm i duedate

Weekly Downloads

10

Version

0.0.2

License

MIT

Last publish

Collaborators

  • saranrapjs