[OPEN-ILS-GENERAL] Covers and ISBNs

Dan Scott dan at coffeecode.net
Fri Oct 7 10:43:08 EDT 2011


On Fri, Oct 7, 2011 at 5:52 AM, Ian Bays <ian.bays at ptfs-europe.com> wrote:
> Hi Ben, Brian et al,
>
> We came across this when trying to show images from Amazon.  We know from
> experience that Amazon mostly only responds to 10-digit ISBNs as the Amazon
> ID matched the 10-digit ISBN.  Amazon's line has always been that they
> provide images keyed on their Amazon ID.
>
> When loading data there are 10-digit and 13-digit ISBNs often in no
> particular order.  So we found the script in Evergreen that forms the URL
> for the image from Amazon and test if the ISBN is 13-digits, and if so
> convert it using Business::ISBN perl module to be a 10-digit ISBN.  So no
> messing with the data in bib at all.  Seems to work well.
>
> On our system the script to change is:
> /openils/lib/perl5/OpenILS/WWW/AddedContent/Amazon.pm
>
> We're happy to share - it's just a few lines.  Maybe this should be on the
> DEV list?

Please do share: it's an open-source project and it sounds like a good
incremental improvement to Amazon added content. The contribution
process is at http://evergreen-ils.org/dokuwiki/doku.php?id=contributing
- it would be great to see your name / company added to the
contributor list!

> Also we noticed that if your ISBNs have hyphens in them then the ISBN only
> comes through as the digits up to the first hyphen (in our case usually
> "0").  We do get lots of cataloguers who believe ISBNs should have hyphens.
> So we are weighing up removing hyphens in data conversion versus finding the
> code that writes the ISBN field and getting it to skip/ignore hyphens.
> Should make it look real pretty!

There are multiple ways of addressing this. I would err on the side of
letting cataloguers enter whatever they want and cleaning up the
results when you pull the ISBN - it looks like the cleanISBN()
function in opac_utils.js is a candidate, and/or in the AddedContent
Perl layer (given that requests may come in from places other than
rdetail.js / result_common.js).


More information about the Open-ils-general mailing list