More in the mobile libraries series.
Back in March I wrote about an implementation of the text the location of this book to me in the Plymouth State University library, part of Scriblio.
At the time I noted "how hard could it be to add this to my own library with Greasemonkey" or some similar off the cuff remark (oh how foolish I can be some times). So let's pick that apart and see how I'd do this at the AADL.
The first part of this is getting a super-compact representation of the item and it's status:
(from Lamson Library)
Listening Is An Act Of Love :...
(LOWER LEVEL) E169.Z8 L49 2007AVAILABLE
http://library.plymouth.edu/read/312114
You'll note that you only have 140 characters or so and it's important to cram enough information into that to get the person who has that short message to the physical copy of the book.
To make this easy, I'm going to use the PatREST API version of the catalog that John Blyberg put together, and pull that page apart to generate the message. This has the advantage of being 1000% easier to parse than the Drupal output on the page. Start from a sample record
http://www.aadl.org/rest/record/1311860/
and notice that the information we need is in the AVAIL, CALLNUM, and FULLTITLE tags. So the bug-ugly incomplete primitive command line version of this looks like
curl http://www.aadl.org/rest/record/1311860/ | \
egrep '(avail|callnum|fulltitle)'
The next step for a subsequent post is to get at that data from Greasemonkey.
Comments