Rebuilding the friendship between Firefox and eBooks

sony-reader-prs505 This is a story about the passion. One that changes life, and one that is obviously is going to change the world. It already does.

I loved books since I was a child. They allow you to travel to the places distant in time and space, to see the worlds that disappeared long ago or did not even exist. They tell stories that fascinate people all over the world and shape our common knowledge like Bible did thousands years ago. And of all modern ways to fill your mind with a fascinating reading the most prominent one is e-books.

History note

There was a time when monks used to rewrite them by hand, and by the mistakes they made in the process we can now get hints on what language did they actually speak besides canonical one. Later, mr. Gutenberg created his famous invention, pretty much killing that little monastery business.

I wonder if there were lawsuits then.

Six centuries later, hand rewriting and retyping made an interesting comeback, when in our country the ability to print was blocked not by technical shortcomings, but by political circumstances. It is known as Samizdat books, funny name coined by resemblance of official publishing houses names, but meaning “My own Publishing House”.

Authors and Publishers

Interestingly, but we are approaching the same destination just having taken other route. These days anyone can be his own publishing house and easly print his own book, or reprint someone else’s.

Of course, that gives traditional publishing houses a hard run for their money and may even eventually kill them. Who cares? In the brave new world we will have the ability to buy books directly from the Author, saving the cost on printing and saving the space on our bookshelves. Everybody wins, and, btw, publishers will have their niche anyway: print-on-demand, illustrated books, atlases, etc.

But the books that are “just text” will soon be arranged only inbetween the Author and the Reader. May be with a little help of some web-service, but soon to sell a book will be as easy as to sell a photo, font, drawing or some other work of art.

And even more. There are several books that I and many other people want written, and I see no reason why the community can not prepay their writing. We prepay opensource software, right? There were lots of cases, when people collected needed sum to pay the developer, funding his work for a promise to release the result into the world. This model will surely work for book developers too.

The modern reading

Ok, now you surely know how wonderful e-books are and how bright our future will be, 🙂 . Time for some gory details.

Whatever you use to read your library (I very very much recommend some eInk based device, your eyes will thank you a thousand times), standards matter.

And looks like the standard for e-books is finally settled, it is called ePub, and is based on open technologies. With Google promizing to release a million ePub books into the wild, and Sony commiting to that format there is no question on who the winner is.

I feel a little sad for other open XML-based e-book format, called FictionBook, because it was much stricter on ruling out the presentation details, caring only about the structure of the book, and leaving the style to the reader.

But, as it was for early HTML, presentational details won. Not as bad as it was for HTML3, through. ePub just lets creator to specify the look in CSS, and does not require the book text to have special DTD, allowing plain XTHML. Still there is special DTD, called DTBook, it is just not required for book chapters, only for TOC.

Not to mention that Fb2 format was our local, Eastern Europe only invention, and was not backed by any big worldwide player.

But hey, ePub is standartized and open: so when one would want to read it the way he wants, it is all up to the extending the reading application. Just like the approach we take to the Open Web.

The task

And here comes the task I chose myself for Mozilla technology course: to add ePub and Fb2 support as an extension to Firefox. That would make interaction with ePub books easier and provide readers with more viewing options.

The problems I have to solve to make the extension work like it should are:

  1. registering the extensions .epub and .fb2, handling their rendering
  2. unzipping the content (both are container formats)
  3. actual presentation
  4. TOC navigation
  5. book metainformation display
  6. some library features

The good news for me that there was an ePub extension once, that did handle points 1-3, called Openberg Lector. Unfortunately, it died two years ago, having never made it to Firefox 3.

Still, it provided me with lots of hints, and reviving it in some form is one of the goals of this project. I am sure it will be useful as people are still eagerly waiting for an update on its AMO page.

And for FB2 format (which is not going away soon in near future in our part of the world) there has not been an extension yet, despite it was asked for on forums several times.

Update Dec 2010:

FB2 reader app is done, available on its own page.

EPUB reader is done by other guys, see Lucifox.

This entry was posted in mozilla. Bookmark the permalink.

2 Responses to Rebuilding the friendship between Firefox and eBooks

  1. skierpage says:

    Yes please.

    You may not have to unzip the content. Firefox implements Sun’s jar: protocol, so it can view jar:file:///path/to/my/ebook.fb2!/chapter2.html .

    Two features I’ve always wanted when reading Gutenberg books in a browser are a) a bookmark, and b) “Search from beginning to here but no further”. Otherwise you search for “Dumbledore” and ->Next scrolls you to the page at the end where he dies, d’oh.

    Good luck.

  2. aladinus says:

    Please make support for smooth scrolling with add-on SmoothWheel (https://addons.mozilla.org/en-US/firefox/addon/357) or Yet Another Smooth Scrolling (https://addons.mozilla.org/en-US/firefox/addon/5846)

    Thanks!

Comments are closed.