In my previous post I’ve shed some light on how the PRS505 ebook reader renders the various supported file formats. In the meantime, I couldn’t resist tinkering around with converting text ebooks into the better-rendering BBeB format.
While I see that creating quality ebooks this way is a long way ahead, a little piece of python script (gut2lrf.py) from my first attempt would certainly give
eTexts a polish.
I started off checking the various existing tools to create BBeB (.lrf) files, and found makelrf3 a simple yet good enough candidate to do the bytecode compilation with. In order to build a version running on linux, I needed to put together a small Makefile, but otherwise it compiled without problems.
Project Gutenberg, with more than 20,000 titles and growing, is an excellent source of free eTexts. However, in order to avoid file-format traps, the project has a strict policy of using plain text files for its text books. What more, there are some conventions keeping us from easily reflow the text within: “Plain text eBooks should have line wraps at 72 characters and skip a line between paragraphs with no indentation.”
My little script – mentioned above – comes to aid here, as it preprocesses Project Gutenberg eTexts to remove unnecessary line breaks. It also fetches the Title and the Author of the book, and then calls makelrf3 to do the text to lrf conversion. Makelrf does a pretty good job splitting up the text to chapters, and quickly generates an lrf file.
The resulting eBook is in BBeB format, which means its file size is smaller than the original plain text document, and at the same time, it is laid out much better on the eBook reader, and also has some meta-info incorporated, which lets you find the book in the book list easier.
These compiled books are much better to read, yet they are still not perfect. They still lack the navigable Table of Contents, rich text formatting, such as stand-out Chapter headings, smaller spacings between paragraphs, words in italic or bold characters, illustrations, footnotes, as well as page headers and footers, so do expect some upgrades to my script down the line. Until that happens, I wish you happy reading on…
0 Response to “Converting Project Gutenberg eTexts into BBeB eBooks”