monket.samedi-studios.com
Crutcher Dunnavant's Stuff


Technorati search


Made with:
Contact me:
  • crutcher(AT)gmail.com
Monket Info:
MIDP MBook Reader Discussion

I've created a Google Group for MBook Reader discussion. I'm looking for help adding features, and compiling a library of books with amenable licenses. Join the group, make some books, write some code, ask for help! The Group URL is:

http://groups-beta.google.com/group/MIDP-MBook-Reader
MBook Library

I've begun the process of compiling a library of MBooks. I am taking submissions, and looking for people to help co-ordinate this. Please participate in the Google Group.

The library currently resides at:

http://press.samedi-studios.com/mbooks/
MBook News

Sun Apr 17 15:56:55 CDT 2005: bind-mbook.sh
I've recently spent some time re-writing the book build system, and produced bind-mbook.sh which should make building jars much easier for people. Look at making your own book section below, which has changed.

Download Latest Version

The latest version is 0.7.0-2, which is available here: Reader-0.7.0-2.tar.bz2. You can browse the rest of the project files, including the Current Tree as well.

Mobile Book Reader

Below is the app running in the applet version of microemulator. An open source MIDP emulator.

This is my MBook reader. It is a GPL'd word-at-a-time speed reader for books on Java MIDP devices (mostly cell-phones). It was initially inspired by this BoingBoing post. It still needs a lot of work, and is at version 0.7.0. It is also my first Java program with any kind of serious threading, so it is not as clean as it could be.

This is a difficult problem because the memory/performance constraints of most MIDP devices make it very, very hard to work with the shear size of most books. This application deals with this by breaking books into chunks small enough to open a stream on, and performing on-demand parsing of those chunks. The threading necessary to make this work took me a while.

Patches welcome, developers wanted! Please submit bug-reports, patches, and comments to: crutcher@gmail.com with the subject heading [MBOOKREADER].

This program reads books which are stored in it's jar file. The books are index by a file with a custom format, mbook-index.txt. The documentation off the format is also distributed in the jar file as mbook-readme.txt. It is sufficient to replace only the text resources in a jar file to change the book which the reader reads.

Currently, I have to load this program using bluetooth, as my phone, a Sony Ericsson T630, will not download it over WAP (perhaps because of the size, perhaps because of some other reason).

The book I am using to demo it is Eastern Standard Tribe by Cory Doctrow. It is a Creative Commons work.

Future Plans

This is my current to-do list, ordered as I intend to get to things. Everything on this list is a goal, though there are some long term possibilities which I don't think it is appropriate to promise here. Patches for providing these features are very much welcome, but MUST be GPL.

  1. saving settings - I need to use javax.microedition.rms to start saving browsing speed, location, and provide an interface for saving otherthings.
  2. font size - Some people have asked to change the font size for the reader, so I want to make this possible.
  3. Reader Wrapper - I want to make a tool which helps build mbooks.
How do I load this?

I am currently loading this onto my phone by loading the file EST.jar with Bluetooth File Exchange on OSX. Your milage may vary. I have found that loading it over WAP fails on MY phone, I think because the file is so large. I am looking for solutions to this.

How do I load my own book?

There are two steps to laoding your own book in the reader.

  1. Prepare your book.
  2. Bind your book.

Preparing your book. Reader reads text files in it's jar from a book description also in it's jar named named "mbook-index.txt", so you'll need to create one. The format of this file is specified in mbook-readme.txt, a copy of which is in EST.jar. Here is a sample mbook-index.txt:

{mbook 1.0 (title "My Book's Title") (author "Me") (url "http://mybooks-url.com") (license "Public Domain") (index [("Chapter 1" mybook/chapter01.txt) ("Chapter 2" mybook/chapter02.txt)] )}

Next, you'll need to create the actual chapters files, here are two sample chapters:

chapter01.txt Here is my book's first chapter. chapter02.txt Here is my book's second chapter.

Bind your book. If you download the software source for Reader, there is a program called bind-mbook.sh, which should give you a jar and a jad with your book in it. To use it, you need to be in the unpacked Reader directory, and you need all the files your your book to be in a directory by themselves, somewhere. Look at the directories in sample-books for examples. Then you run a command like this:

./bind-mbook.sh MyBookName path/to/my/book/dir path/for/the/jarfile

As an example, the EST.jar and EST.jad files in sample-books are built using this command:

./bind-mbook.sh EST sample-books/est sample-books
The Screens
The Title Page
This is a sample title page.
The Contents Page
This is a sample contents page. This book's chapters really are named "1.", "2.", etc.

Reading
Here is the reader reading. Note the >>> mark indicating that it is reading. Note: the number of the form XXXms, is the average delay in miliseconds. The app will go as FAST as 40ms, and as SLOW as 500ms.

controls:
  • UP - Speed up.
  • DOWN - Slow down.
  • LEFT - Skip back 2.5 seconds.
  • RIGHT - Do nothing. (Useful for keeping phone awake)
  • FIRE - switch to scan mode.

Scanning
Here is the reader scanning. Note the <=> mark indicating that it is scanning.

controls:
  • UP - Skip back 5%.
  • DOWN - Skip forward 5%.
  • LEFT - Scan backward.
  • RIGHT - Scan forward.
  • FIRE - switch to read mode.
Misc

Groups

Business

Kick Ass Web Services

Publications

Reference