Category Archives: library

On this page:
  • Ruby code to quickly convert titles to ISBNs
  • I love you library!
  • Library Elf is awesome
  • Library book reminder script – Perl geeking required
  • Library run
  • Should track library subjects

Ruby code to quickly convert titles to ISBNs

I love the Toronto Public Library system. I can’t say that enough. I particularly love how I can go on a reading spree, place holds on a gazillion books, and have them delivered to the library branch that’s about three blocks away from the house.

Ideally, of course, these books would arrive suitably spaced apart so that a new batch arrives just as I’ve finished another. This happens when I request popular books. Most of the time, though, the books that I want to read fall in the Long Tail–obscure titles, books that have fallen off the New York Times bestseller lists, and the occasional random find.

All of these books tend to descend on the unsuspecting library branch at the same time.

There were 27 books waiting for me earlier. The librarian thanked me for clearing the shelf. J- greatly enjoyed piling them into the shopping cart we had the foresight to bring. Yes, I’ve got presentations to prepare and things to do–but reading is fun, and I’m somehow going to find time to read all those books before my three-week loan period is up. I’ll probably be able to renew them, but hey, might as well try.

So I decided I might as well try tracking them on LibraryThing. Instead of typing in all the details manually, I grabbed the list of titles from my account on LibraryElf (good reminder system for books), used ISBNdb to convert the titles into ISBNs (best guess), and imported the list of ISBNs into LibraryThing. Now my profile lists 163 books–a small fraction of the books that have passed through my hands, but it’s better than nothing. Someday I might even get myself a barcode scanner so that I can just pick up the ISBNs from the book jackets.

Anyway, I promised the Ruby code I’d quickly written to convert the titles to ISBNs:

require 'net/http'
require 'CGI'
require 'open-uri'
require 'rexml/document' 

access_key = 'YOURACCESSKEYHERE'
while (s = gets)
  s.chomp!
  url = "http://isbndb.com/api/books.xml?access_key=" + access_key + "&index1=title&value1=" + CGI::escape(s)
  xml = REXML::Document.new(open(url).read)
  if (xml.elements["ISBNdb/BookList/BookData"])
    puts xml.elements["ISBNdb/BookList/BookData"].attributes["isbn"]
  end
end

Takes titles as standard input, prints out ISBNs. Enjoy!

I love you library!

On February 21, when you access the library’s catalogue and your account online, you will see the following improvements

  • Book covers and reviews for many items
  • Receive email notification about holds and overdue material, if you have provided library staff with your email address. After February 21, contact your branch or call Answerline (416-393-7131) and provide us with your email address, if you wish to take advantage of this new service.
  • Ability to suspend your holds request for a period of time – eg. do not fill this hold between July 10 and August 1. Your place in the holds queue is maintained but you are not called if you come to the top of the list between July 10 and August 1. After August 1 your hold becomes active again and you will be called when the item is available.
  • Ability to change the pick-up location for unfilled hold requests.

Toronto Public Library > About the Library > Website Redesign

I can’t wait to see the new interface!

Powered by ScribeFire.

Library Elf is awesome

image

When I blogged about my totally small-school library reminder script, Claudine recommended Library Elf, which helps people manage their library loans. I hopped over and set weekly reminders to go out on Sunday, just before my Monday book runs. I just got my first reminder e-mail from them, and I am impressed. C’mon. Look at that screenshot. It tells me when books are due and when my holds expire. If I hover over the links, I can see which books they are. The lists of holds ready for pickup and books that are checked out are sorted by date, which makes perfect sense. I can add W-‘s library card and track his books as well. =)

Awesome awesome awesome.

Library book reminder script – Perl geeking required

W- and I borrow lots of books from the library. This script helps keep order in the house by reminding us when either of us have books that are due. I’ve removed our information from it and have made no efforts to make it user-friendly. Perl geeking required.

opac-reminder.txt

(It’s really a .pl. Can’t be bothered to mess around with forcing content type at 1:10 AM…)

Here’s the one that generates the RSS file that’s pulled into the right sidebar of my blog:

opac2rss.txt

Enjoy!

Library run

We exercised by running to the library. Running with a full backpack
of books turned out to be interesting—and tiring! It was good to
exercise, though. I look forward to doing that again tomorrow,
although maybe to somewhere else.

Random Emacs symbol: insert-monthly-bahai-diary-entry – Command: Insert a monthly diary entry for the day of the Baha’i month corresponding

Should track library subjects

You know what I’d like? An easy way to keep track of the topics I’m
reading about, and a way to visualize that over time. LibraryThing or
some other Amazon-hooked services wouldn’t be a bad way to get the
data in. Then it’s just a matter of looking up the category. I can
also keep track of links between books and people, and also links
between books and other books.

First things first: find an unobtrusive way to get the data into the
system. I’ll need it datestamped and indexed by ISBN. Ideally, I’d
have this just automatically hooked into my library checkout page, but
I haven’t checked if they’ve embedded ISBNs into the checkout list. If
not, I can enter them in manually, although numbers are a bit of a
pain to type accurately.

Hmmm…

Random Emacs symbol: floor* – Function: Return a list of the floor of X and the fractional part of X.