You are looking at historical revision 22166 of this page. It may differ significantly from its current revision.
isbn provides utilities for handling international standard book numbers. The isbn egg consists of two modules: isbn for validating isbns and isbndb for querying the database at http://isbndb.com. For this you need to provide an api key which is free of charge:
In line with the long term vision of the ISBNdb.com project the access to the data from individuals should be free of charge. In reality, this is extended to even broader range of application -- as long as the application does not send an excessive amount of requests and meets our pretty liberal terms and conditions -- most uses are OK, individual, research or commercial. source
(require-extension isbn) (require-extension isbndb)
normalize-isbn[procedure] (normalize-isbn STRING)
Reduces the ISBN string to the allowed "compressed" format without spaces or dashes as separators.
valid-isbn?[procedure] (valid-isbn? STRING)
Checks ISBN-10 and ISBN-13 numbers by normalizing them and running the checksums agains the numbers.
isbn10->isbn13[procedure] (isbn10->isbn13 STRING)
Converts a ISBN-10 number to the EAN compatible ISBN-13 format. Returns a dash separated string or #f on error. This function has been added with version 0.2 of this egg.
isbn-type[procedure] (isbn-type STRING)
Returns 10 for ISBN-10 and 13 for ISBN-13 numbers or #f if no valid number has been given. This function has been added with version 0.2 of this egg.
#;1> (normalize-isbn "978-3854523871") "9783854523871" #;2> (valid-isbn? "978-3854523871") #t
Parameters: The API key & DB base URL[parameter] (api-key STRING)
The isbndb web api requires you to register on the site to aquire a database key. Registration is instant and can be done here.[parameter] (database-url STRING)
URL of the base API URL, in case this should ever change. Default: http://isbndb.com.
isbn->alist[procedure] (isbn->alist STRING)
Queries the isdndb for an entry belonging to the ISBN string. No ISBN validation is done at this stage. Returns an alist containing title, authors, subtitle, publisher. Returns an empty list if no entry could be found.
#;1> (isbn->alist "978-0262011532") (((title . "Structure and interpretation of computer programs") (authors ("Harold Abelson and Gerald Jay Sussman, with Julie Sussman; foreword by Alan J. Perlis")) (publisher "Cambridge, Mass. : MIT Press ; c1996.")))
Copyright (c) 2010, Christian Kellermann All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- initial release
- isbn 10 -> 13 conversion added thanks to Alaric Snell-Pym