abuse at cabal.org.uk
Sat Jan 5 21:48:47 GMT 2008
On 5 Jan 2008, at 18:30, Simon Wistow wrote:
> On Fri, Jan 04, 2008 at 02:55:52PM +0000, Dave Cantrell said:
>> There's a bug in the magic that converts XML into HTML for the
>> website -
>> if a book has an ISBN-13 (and all new books should now) then the
>> URL used to linked them is broken cos ASINs are still only 10 digits.
> Is there a mapping from ISBN-13 to ASIN? If not I'll hack the logic to
> just not link.
suggests that you're supposed to do an Amazon API call to get an ASIN
from an ISBN-13, which is a bit suboptimal. However, an easy and
obvious thing to do is to convert ISBN-13s starting 978 to ISBN-10s
and then use that as the ASIN.
The conversion just involves lopping the 978 off the front and
recalculating the checksum. ISTR spotting a module on CPAN to do this
although it's not all that tricky to roll your own.
More information about the london.pm