For the past few weeks, I have been spending most of my time implementing Epub support for Sugar’s Read activity. Epub is gaining increasing acceptance, and a few weeks back, Project Gutenberg started distributing many of their material in the format, and Google + Sony also seem to have started to distribute a large chunk of public domain books as Epubs.
Today I finally reached the stage where the work could be tested on an
actual XO, and here’s how it looks:
The rendering is done using WebkitGTK (the Python bindings) and I was a bit concerned about the possible performance issues on the XO-1 (which has a relatively ancient processor, slow filesystem access, only 256 MB of RAM and no swap). The biggest worry was the loading time - since it involves pre-rendering the entire book to gather metrics for pagination (most Epub books I have come across do not have clearly defined page-breaks, so that has to be figured out), but to my surprise (and relief) the load time turned out to be quite acceptable.
Right now, the viewer supports a very limited subset of the Epub standard (and works only with XHTML based Epubs), but so far it has managed to handle all the files I have tested it with. The viewer is a standalone widget used by the , which should make it possible reuse the work to develop a Epub reader for GNOME as well.
Once the Epub support in Read reaches an acceptable state, the plan is to start working on implementing support for the draft Open Publication Distribution System specs, which allows ebook distributors to distribute e-books via XML catalogues. It makes sense to support this in Read, as well as in the school server, to ease the e-books distribution process. For example, if we have a large e-book collection for a particular deployment, it may not make sense to put all of them in individual laptops - instead allowing the user to browse/search the catalogue and download the books as and when required would probably be a better option.