Tuesday, December 21, 2010

Reading Books on the iTouch

Earlier we had hacked liam's nintendo DS so we could read ebooks on it. And it works but i don't carry around a DS so i wanted to turn the iTouch into a ebook reader.

When i got the device i immediately jailbroke it so the first step was to restore it to default and install the latest version 3 of the os. Next i downloaded the Stanza ebook app along with the apple ebook reader, the kindle and kobo ebook apps and the dropbox app. I wanted to explore various methods of using the device. The kindle and kobo approach is to tie your mobile device to an online store (like the itunes store) and i don't like that approach. I want to be able to put any ebook on it and to download from multiple sources or transfer directly from my computer.

First off we tested the stanza ebook app. This works well and has a section for free online book sources such as Gutenbery and Feedbooks as well as a link to my fav publisher, O'Reilly and some vanity presses. It is not obvious how to add additional sources, for example - can i add a local source such as a web server on my home network as a source of books?

We also downloaded the stanza desktop app for the mac, this allows you to read books on a desktop which is ok, but more usefully it lets you convert books between different formats.

Unfortunately, the instructions on the stanza web site on copying books to the itouch from itunes are obsolete (or written for the pc version of itunes). It's odd that i was able to import a bunch of pdf ebooks into itunes to the books library and that there is a books library on the itouch, but there does not seem to be a way to sync the books from the desktop itunes to the itouch. Perhaps they have to be in a different format? The apple web site notes that you need ios 4 or better which means 2nd gen itouch and mine is 1st gen so there is no books tab in the itouch window when the device is selected.

We decide to try to download some books from our web server on the home network. For the mac desktop this is http://localhost which corresponds to library\WebServer\Documents and it has a default web page of index.html which we delete. Next we copy a folder of ebooks in various formats to this folder. We discover that file permissions must be set so that everyone can read them.

We fire up Safari on the itouch and goto http://192.168.1.105 and browse the ebooks folder and select sharpe's skirmish in epub format. But because it is in epub format the web browser cannot open it and there is no way to download. Same for other formats. I was able to open and read html, txt, and pdf because they are supported by safari.

The other option is to use a website that is supported by stanza. So we head off to: http://bookworm.oreilly.com and create an account. It turns out i already created one last year and had uploaded a few books. The idea was to test out reading in bed using a netbook. This was not a success as i found the netbook screen just too small and the device uncomfortable to hold for long periods and so went back to printed books for bedtime reading. So now we decide to upload a Richard Dawkins book in epub format.

This works fine and next we turn to the itouch and run Safari and goto http://m.bookworm.oreilly.com and sign in to our account. All out books are listed. We click on the arrow next to the Dawkins book that says Read in Stanza and the stanza app is automatically loaded and the book is downloaded to the itouch. It works but it got the title wrong.

This works but we would have to convert books from the common chm and pdf formats to epub. And what about all our comics in cbr ad cbz format? A batch process would be useful here, the workflow (automator?) would be to pick up all new books in a file folder and convert to epub format and store in an uploads folder to moving to the bookworm web site. How secure is bookworm and how much storage do you get? I would prefer a local solution - how do you make a web-site stanza ready? It would be a very useful plug-in for Joomla or Drupal or Wordpress. Perhaps the workflow script could be modified to:

- convert ebook files to epub
- upload files to web server
- parse author/title info and enter in the mysql database
- create an xml file with the data for use by stanza
- build html code based on xml file and display as part of a catalog of books

I see people have come up with some solutions to the problem such as this post by cornfed

- use the program CalibreDBxtractor
- see http://www.mobileread.com/forums/showthread.php?t=62332

CalibreDBxtractor also builds web pages that you can turn on or off at the time of build, the function of downloading the ebooks or just showing the discription of the ebook. The program is now called calibre2opds and is hosted at https://launchpad.net/calibre2opds and requires java and calibre. The progam basically uses the Calibre ebook reader to produce an OPDS compatible xml catalog complete with cross-references and links to web pages. OPDS is the open publication distribution system. From the google code web site:

The Open Publication Distribution System (OPDS) Catalog is a syndication format for electronic publications based on Atom RFC4287 and HTTP RFC2616. Catalogs enable the aggregation, distribution, discovery, and acquisition of electronic publications. OPDS Catalogs use existing or emergent open standards and conventions, with a priority on simplicity. This work is part of the BookServer project: http://www.archive.org/bookserver

This looks good. Hey, since the output is html i could use my public folder on dropbox as a testbed.

No comments: