export from the OPAC to del.icio.us and LibraryThing

Yesterday, during Brian Kelly‘s opening session on Web 2.0 at the CILIP “Fly in the Web: Power to the User” event at Leeds Met, I started to think about ways of our linking library stuff into del.icio.us…
One of the things I’ve already hacked into the OPAC is the ability for a user to see their lending history — you can see a bit of it at the foot of this screen shot:

So, I decided to play around with the del.icio.us import facility to see if it was possible to export the lending history from the OPAC and then import it.
The first thing I did was to get a version of the lending history in a suitable format (see Netscape Bookmark File Format).  You can see my bookmark file at this URL:
(I should point out that my library card gets used for a lot of testing, so I haven’t really borrowed everything on there… honest!)
If you look at the HTML source for the page, you’ll spot that I’ve included the tag “hudunilibrary” and (when available) the ISBN for each item.  Each item also has a description for the last checked date & time (I’m still not sure if I should include that info?).
Once you’ve got the bookmark file, you then need to save it to your hard drive and run the import process in del.icio.us:

The only real potential problem is that del.icio.us automatically marks all imported links as “private” — so, if you want to share your lending history, then you need to manually update every link (very tedious!).  Anyway, I’ve shared a few just so you can see the tag in action:
The import facility at LibraryThing is able to pick out the ISBNs in the bookmark file, so it’s also possible to transfer a subset of the lending history into there:
The Dynix/Horizon OPAC also has a “My List” facility, so I might see if it’s possible to hack that to output a suitable bookmark file as well.
I did mean to take a few photos at the CILIP event, but totally forget until Sheila Webber was halfway through her session on blogging — anywhere, you can find a couple of photos here.  I think someone may have taken a shot of me during my workshop session, although I’m not really the most photogenic of people!

9 thoughts on “export from the OPAC to del.icio.us and LibraryThing”

  1. Hi Dave, Very cool! I have some questions about the lending history feature. Is this turned on for all patrons by default or do they opt in? If they opt in, how did you set this up? We’re on Horizon 7.3.4/HIP 3.08 and lending history is an all or nothing affair for us (as near as I can tell) and saving the lending history of all our patrons would be illegal. By the way, thank for providing lots of inspiration to play with our own HIP installation! –Lynn

  2. Hi Lynn
    To the best of my knowledge, we’ve never had a single user question or complain about the fact that their own lending history is available to them in HIP — all of the comments have been positive. In fact, having such a feature was requested by a number of our students.
    The lending history (stored in the “circ_tran” table) is something we’ve always had and I suspect was set up by Dynix when the system was installed in 1995/6. The table simply stores the borrower number, the item number, and the date/time of the check out. I believe that a number of other UK sites also have the same configuration.
    Once a borrower leaves, their actual borrower record (which contains their personal details) can be removed from Horizon and this breaks the link back from a borrower number to an actual identifiable person. Just like Patrick McGoohan found out in The Prisoner, everyone ends up just being a number in the system!
    The fact that borrower 3165 borrowed items 87123, 1236, and 985 six years ago is useful for data mining purposes and analysing aggregated borrowing trends. However, we wouldn’t gain anything by then cross-referencing that with their borrower record.
    It’s also worth pointing out that everything we do is governed by the terms of the Data Protection Act and the University’s own data collection policies.
    I have no qualms about posting the link to my own lending history bookmark file, but I know I’d be out of a job (and probably in police custody!) if A) I posted a link to someone else’s file without their permission, or B) you were able to guess the URL of someone else’s file — hence the obfusticated URL.
    Given the opportunity, I’m sure many of our users would like to share their lending history more widely — e.g. by having a “here’s what I’ve read recently” widget in the sidebar of their own weblog… in fact, that’s just given me an idea!!! 😀

  3. A quick bit of hacking later, I’ve got a prototype widget that will display either a list of books I currently have on loan:
    example 1
    …or a list of the last X (e.g. 10) items I’ve borrowed:
    example 2
    If you view the page source, you’ll spot that the widget is pulled in via JavaScript (“src=….”) although it would probably make more sense to have the widget output XML (or possibly both).
    I’ve also added it to my sidebar:

  4. Hi Dave, Thanks for the response. I’m aware of the circ_tran table – but it breaks the link between items and patrons upon check-in here in accordance with our laws (which are different than yours – obviously!). *sigh* Under the law here, we can keep patron history if this is a completely opt-in function that can be turned off and cleared at any time that the patron desires. I haven’t yet figured out a way to implement this on our versions of HIP and Horizon… it’s either all or nothing. So, to be legal, it’s nothing. –Lynn

  5. Hi Lynn
    I guess one way around it would be to enable full circ_tran logging, but to have a separate script or program that periodically removes entries where the item has been returned and the user has not opted in.
    You’d then need to have a separate table where you can store the borrower# of patrons who’ve opted in.
    There was a similarish thread of discussion in this blog post.

  6. Hi Dave, Thanks for reminding me of that post. I like your idea and will run it by our legal department. I think I can already predict what they will say though… “Periodically isn’t good enough.” Of course, maybe I could schedule the script to run really often – though we have a fairly large database that would limit how effective this technique would be.
    I understand privacy law and support it… and I certainly get annoyed when companies keep data about me needlessly. Any yet… Lynn

Comments are closed.