Wednesday, February 13, 2008

More OLPC eBook

First, a new imgview is available at:
It includes a experimental pie-menu for use in eBook mode, allows to adjust backlight brightness and toggle black&white mode, all other menu entries don't do anything and are currently just placeholders.

As imgview is only good for scanned pages and other image based books, here now some tips for non-image texts, i.e. plain txt files.

Opera for the XO contains a lot more features then the currently build in Browse activity and is thus much more comfortable to use, to installing it is recomment. I couldn't make the Opera Activity work, but running it from Command Line worked fine.

While plain txt files are readable in Opera or Browse, anything larger then 20kb becomes quickly uncomfortable due to lack of proper in-page bookmarks and slow scrolling in ebook-mode, to fix this I wrote a simple script, split-txt.rb. All it does it take a filename and a regex and then split the file whenever that regex occurs. This allows to split files into nice chunks.

To fix the formating of plain txt files there is a nice little tool called txt2html. With it one can turn a txt into a html. This allows the easy use of a variable width font and proper text flow. And with Opera one can even add a custom style sheet to customize the output even more. txt2html doesn't always work perfectly, but a few regex onto the source material often fix that.

With split-txt.rb and txt2html in combination one can easily turn a long text into a some nice junks of .html that are easy to read and handle on the XO. One still has to turn into laptop mode to switch chapters, but other then that it works relatively well.

No comments: