Archive for the ‘Code/API’ Category

KohaCon 2011

By Noufal

Anand and I attended the Koha Conference in Thane, Mumbai earlier in November and spoke about Open Library. The conference took place from Oct 31 till 2 November. There was a hackfest following the event from 4th to 6th.

We missed the first day and presented our talk on the second day of the event. The first day had a number of interesting talks mainly about libraries shifting to Koha and about deployment issues. We spent our free time speaking to Robin Sheat, Dobrica Pavlinu i and Ian Walls among others about ways to tie up the Open Library data along with Koha installations. While the audience was somewhat small, it was truly international. There were folks from Kenya, Nigeria, France, the States, New Zealand, Australia, Croatia and of course various parts of India. We also met Savitra who apart from being a Koha developer, runs a Bangalore based company called OSS labs that provides hosted Koha instances for libraries.

We presented on the last day. Our slides are available at http://internetarchive.github.com/kohacon2011-presentation/. It was an introduction to Open Library, the data we have and some discussions on the API. There were a few questions mainly about copyright issues and about the classification system we use on the website. The conference was attended by many librarians and two of them (The Institute of Management Studies Library at VPM Thane and the University of Zagreb Faculty of Humanities and Social Sciences Library, Croatia) have applied to join the Open Library Lending Library program.

After the presentations, November 3rd was a day off and we spent it wandering around the older parts of Mumbai. On November 4th, we went back and spent the morning brainstorming about ideas to implement. We came up with a few

The first is a simple database update that presents OL as a search option when a book is not found while searching in a Koha installation. It’s been done and signed off.

The second was a simple Javascript change that fetches covers and borrow information from Open Library and then presents it when searches are done on Koha. This has been implemented as well.

The third is the most involved part and we have started work on an API to upload covers to OL which can be used by any external program. We have also started work on an API for Koha to search our records to see if the book being added is already in our database (in which case, it can auto complete the details for them). The search will also return the cover if it exists. On our end, if the koha side agrees, we can populate our database with the catalogue record being searched for and if a cover is uploaded, we can get a copy of that as well. This means that if a Koha instance in one library has uploaded a cover, other libraries will be able to use it. On the Koha side, Robin has a private branch that contains the work in progress. Details are in the bugzilla entry.

We’re following up on the bugs and the lending library requests to join. On the overall, it was a wonderful event and one that benefited Open Library as well as Koha.

BookReader Work Sprint at NYPL Labs

By mang

We had a really fantastic code/work sprint for the BookReader organized by the most excellent NYPL Labs.  The sprint was designed to bring together organizations that have an interest in the BookReader as a way to foster the sharing of interest, code and expertise.

New York Public Library

We started by making a list of desired features and prioritizing them.  High on the list was to make the code more modular and easier to understand, reuse and extend.  We made great progress towards that goal by creating a new plugin architecture that allows new views of the book to be added cleanly to the existing code.  For example, it will be possible to create a book view that uses the <canvas> tag or other advanced web technologies and have it automatically included in the BookReader application simply by including that plugin’s JavaScript file.

Looking down into the stacks

Another highly desired feature is making it easier for people to use their own books with the BookReader application.  Doug Reside from NYPL Labs contributed a “book loader” (our new term for the piece of code that connects the BookReader to the underlying images and metadata for a book to display) that allows you to specify the images for a book directly inside an HTML file.  This new loader provides a simple way to use the BookReader for your own books.

The new code is currently on the codesprint branch of the BookReader github repository.  We plan to integrate the new plugin system once the code has been polished and tested. Updated documentation is also coming. You can subscribe to the bookreader-announce mailing list to be notified when the code is released. You can also find more information about developing and using the BookReader in our developer resources.

Mitch Brodsky with his BookReader customized for the NY Philharmonic

This works sprint hosted by NYPL Labs marks an exciting new milestone in the development of the BookReader. We’re setting the foundation for greater re-use and collaboration around the BookReader. Many thanks to Doug Reside, David Riordan and Ben Vershbow of NYPL Labs for organizing the sprint and the fantastic attendees who contributed ideas and code commits!

BookReader Sprinters

Tim Berners-Lee: The year open data went worldwide

By George Oates

API with RDF/XML output available

By karen coyle

It is now possible to access Open Library book metadata in an  RDF/XML format. The access is through the RESTful API. For an example, view:

http://openlibrary.org/b/OL6807502M.rdf

The returned RDF/XML relies heavily on Dublin Core metadata terms, and uses some elements from bibliontology and the registered RDA schemas. Although soundly based on RDF, the output can be used like any XML and presents (most of) the Open Library metadata in the easily understood Dublin Core terms.

It has been suggested that this format include links to cover images, where available. It is also on our list to add tables of contents to the output. Other suggestions are very welcome — add them here, or send them to the ol-tech discussion list.

We’d love to hear about the uses you make of this API, and anything we can do to help you get more out of the Open Library.

New Right-to-Left Capability in Book Reader

By mary murrell

Nearly 11,000 Yiddish books (half of all Yiddish books ever published) recently went online through the Internet Archive in cooperation with the National Yiddish Book Center‘s Steven Spielberg Digital Yiddish Library. As part of this project, we’ve upgraded the Internet Archive Book Reader to support the right-to-left page progression of Yiddish books. Here is an example.

We’ll be working to adjust the metadata of our books from other right-to-left languages, such as Arabic, Hebrew, Urdu, and others, so that they will work in the book reader, too.

Although the book reader is now available to view only through archive.org, we are working to bring the book reader to openlibrary.org as well. Stay tuned!

OpenBook WordPress Plugin

By mang

The OpenBook WordPress Plugin by John Miedema can be used to easily reference books from inside your WordPress blog and automatically pull covers and book data from Open Library.

We’re quite excited to see people using Open Library and building new tools using our public APIs.

Here’s an example of using the plugin:

Free Culture
Lawrence Lessig; Penguin (Non-Classics) 2005

This book was pulled in by using this tag in the WordPress post:
[openbook booknumber="0143034650"]

The “booknumber” in this case is an ISBN book identifier and is causing a search behind the scenes.

You can also use the Open Library opaque IDs to refer to a book when the ISBN isn’t available (e.g. for books published before ISBN existed!)

In that case your link would look like this:
[openbook booknumber="/b/OL14015131M"]

Many of the Open Library books (particularly older ones) do not have a cover associated with them, but you can add one from the Open Library page for that book!

The OpenBook article in the Code4Lib journal describes some of the design decisions and implementation. (Note: the article mentions the old [openbook]0864921535[/openbook] way of using the openbook shortcode. The newer [openbook booknumber="0864921535"] style should now be used instead.)