Skip to content

convert library book due dates into Reminders.app reminders

License

Notifications You must be signed in to change notification settings

saranrapjs/duedate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

convert library book due dates into Reminders.app reminders

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published