QR codes in the library catalogue

Really quick introduction

QR codes are a type of 2-dimensional barcode that can be used to encode various information. A QR code looks like this:

QR codes have various applications along the lines of mobile tagging: embedding information on something in a way that can be understood by a smartphone. My colleague Adrian blogged about them a few days ago.

You will likely appreciate the explanation that the above is a link to Hackney, that rose-red empire : a confidential report / by Iain Sinclair in our mobile catalogue.

Why we wanted to do this

The reason is to embed some information about the item on the bibliographic record screen that is useful to a smartphone.

We’ve noted many readers making use of smartphones to record shelfmarks of items of interest versus pen and paper. It’s noticeable that more readers are coming to the enquiries desk to show us a record on a smartphone with a query about it. We’re not sure how readers are making the leap from the catalogue terminal to the smartphone though. Aaron Tay makes this observation:

These days, it’s very common for users to show me library catalogue records (call numbers, titles) on their hand phones when I’m at the desk. This seems to be quickly replacing scribbled notes on paper. I’m never worked out the courage to ask them though, how they got the information onto the handphones

Our assumption is a URL would be a useful thing to encode and as it’s for use on a smartphone, a link to our mobile catalogue might be the most appropriate thing. Have the right QR code app installed and you can snap away on the catalogue and end up with a list of items to go and find them (wayfinding in our building is another blog post).

I haven’t actually made this live yet: it will be live tomorrow!

How to do this in the Innovative ‘classic catalog’ / WebPAC

Here’s how. On your WebPAC server put this Javascript in /screens/qrcode.js:

function linkto_catalog_qr() {
        var qrairpacstub = "http://m.ulrls.lon.ac.uk/record=";
        var qrrecordlink = document.getElementById("recordnum").getAttribute("href");
        var str = qrrecordlink.indexOf("=");
        var qrrecordid = qrrecordlink.substr(str+1);
        document.write('<img src="http://chart.apis.google.com/chart?cht=qr&chs=120x120&chl='+qrairpacstub+qrrecordid+'" alt="QR code for this record" title="QR code for this record" />');
        document.write('<br/><a href="http://www.senatehouselibrary.ac.uk/library/helpandsupport/qrcodes.shtml">What's this?</a>');
}

Above, “recordnum” is the ID of a link inserted into the bib_display.html using the WebPAC <!–{recordlink}–> tag. This produces a link like this in the page markup:

<a id="recordnum" href="/record=b3112148~S1"></a>

In your INSERTTAG_INHEAD wwwoption, insert this:

INSERTTAG_INHEAD=<script language="JavaScript" type="text/javascript" src="/screens/qrcode.js"></script>

On your bib_display.html, put this JS where you want the QR code:

<script type="text/javascript">
<!--
linkto_catalog_qr();
-->
</script>

An alternative approach is to put the JavaScript to generate the markup into the WebBridge bib panel. Rather than using WebBridge to create a link, you embed the little chunk of JavaScript that generates the QR code for you. This idea is from Natalie Pollecutt at the Wellcome Library who posted about it on the IUG mailing list.

Wellcome Library haven’t made this live, but you can see it on their test / “staging” port, for example: From ‘cuckoos’ to ‘zombies’ : the changing portrayal of lobotomy in American popular fiction from 1960-2010 / by Amy Chandler.

Result

Hackney, that rose-red empire : a confidential report / by Iain Sinclair.

CC BY-SA 4.0 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

4 thoughts on “QR codes in the library catalogue

  1. Excellent work 🙂 I just love how technology evolves as people find new and interesting uses for it. I once had a discussion regarding MS’s Surface system with another (older) colleague at one of the offices I work at where he was saying that he couldn’t see the point of the device as there wasn’t any use for it.

    I tried to explain that I thought this was a good thing as it encourages innovation and new ways of thinking, just look at that favoutite hackers playtoy the Kinect – originally designed as a games console controller interface it’s actually a rather powerful little device and plenty of engineers have come up with some truly amazing uses for it 🙂

    As smartphones become the defacto mobile device, with the whole world and it’s dog seemingly owning an iPhone and with those on a tighter budget or who want a choice of handsets picking Android devices, I think we’ll start to see companies making use of their capabilities a lot more.

    1. Hi Mark, thanks for this! I agree with smartphones becoming pretty ubiquitous we’ll only make more and more use of this sort of thing. Other suggestions are things like QR codes on bits of equipment like our printers and microfilm readers that go to a video explaining how to use it, or a QR code linking to an available ebook version stuck on the front of a print book.

      Interesting you mention MS Surface. The public library in Darien, Connecticut has one – the only library application of this I’m aware of. Their assistant director blogged about it a while ago.

Comments are closed.