Shiny New E-Book Gizmo: The Amazon Kindle


View Full Version : Integrated FBReader 0.8.14 with ePub and Registry Support


Adam B.
02-12-2008, 08:49 AM
It's been about 6 months since my last port of FBReader. The talented FBReader developers have done a lot. The most important addition is the support for ePub books. You can view the full changelog at FBReader.org (http://www.fbreader.org).

I, myself, have done a lot of things different for this release as well.


I've removed the FBReader toolbar, and thus, disabled the internal library.

This was mostly done to speed up porting time. With the library removed, much less needed to be done to the code of the program to port it.
All refreshes are done internally. No hacked libX11 is used!

By default, FBReader will add supported file extensions to the registry

This makes FBReader act like any other viewer on the iLiad.
FBReader settings and configuration will be saved to /mnt/settings so a software update should not erase them.

The installer no longer requires a memory card, and will be installed to internal memory.

The internal memory of the iLiad has 7.8MB free after installing FBReader. It should not interfere with anything else installed internally.



Based on a support thread I made, file extensions supported are:

chm
rtf
oeb
opf
epub
fb2
tcr


Because the toolbar is gone, most of the important functions can now be accessed by the hardware buttons:


Upper Left/Quit Button

Will cancel out of TOC screen, and will quit when inside the book.

Page Bar Forward

Short Press

Next Page



Long Press

Redo


Page Bar Backward

Short Press

Previous Page



Long Press

Undo


Up Arrow

Short Press

Previous TOC Section



Long Press

Increase Font Size


Dot or "Enter" Button

Short Press

Show Table of Contents



Long Press

Rotate Page


Down Arrow

Short Press

Next TOC Section



Long Press

Decrease Font Size




Installation of this is simple. You'll need firmware 2.12 and Developer Shell access. Unzip the file, and copy anywhere on your iLiad. You will need to restart your iLiad when it prompts you. After you've restarted, you can delete the installation directory.

There will be no icon to run FBReader, you'll need to select a book from the contentlister with one of the file extensions listed above.
Supported books will have a valid icon.

wallcraft
02-12-2008, 10:12 AM
I see several problems with this approach:

a) If the encoding is wrong, how is it changed? This is on the book info interface.
b) How to get a different font?
c) In general, how to get to the preferences interface?
d) How to use FBReader for HTML and MOBI, and how to use FBReader for only some MOBIs (i.e. the DRM-free ones)?

Assuming the book info and tools (preferences) interfaces are still there, the above are mostly a problem because of the lack of hardware keys. So perhaps they could be worked around using the on-screen keyboard. I would certainly use FBReader for HTML and MOBI if given the choice, ditching the MobiPocket Reader.

My other concern is that I like FBReader's library, which is a huge improvement over the contentlister, but I can live with no library if I can customize FBReader otherwise. Certainly, a usable full screen mode and faster page turns will be a big help.

Adam B.
02-12-2008, 11:10 AM
I see several problems with this approach:

a) If the encoding is wrong, how is it changed? This is on the book info interface.
b) How to get a different font?
c) In general, how to get to the preferences interface?
d) How to use FBReader for HTML and MOBI, and how to use FBReader for only some MOBIs (i.e. the DRM-free ones)?

Assuming the book info and tools (preferences) interfaces are still there, the above are mostly a problem because of the lack of hardware keys. So perhaps they could be worked around using the on-screen keyboard. I would certainly use FBReader for HTML and MOBI if given the choice, ditching the MobiPocket Reader.

My other concern is that I like FBReader's library, which is a huge improvement over the contentlister, but I can live with no library if I can customize FBReader otherwise. Certainly, a usable full screen mode and faster page turns will be a big help.

The options page is still intact. But using it would be troublesome because there are no screen refreshes programmed in. Your best bet would be to install dropbear, ssh into the iLiad, modify /mnt/settings/.FBReader/options.xml and map two of the keys to the options and book info dialog. You may also want to either manually call displayMgrClient from the shell to refresh the display, or modify the launching script to use the hacked libX11.

As my time lately has grown increasingly scarce, I decided to use this method to speed along porting time. I'll upload my sources if someone wants to work on a more featured port.

Edit:
Application Sources: http://projects.mobileread.com/iliad/projects/fbreader/fbreader-0.8.14.iliad.tar.gz
Staging Area Source (for creating an ipk): http://projects.mobileread.com/iliad/projects/fbreader/fbreader-staging.tar.gz

Ido Ilan
02-12-2008, 12:07 PM
Hi Adam,

I prefer the old way, I use the FBReader standalone and don't change the registry.
I like the toolbar and would gladly wait additional time for a standalone application with the all the improvements.

Ido

nekokami
02-12-2008, 01:01 PM
I think I would miss FBReader's library too much. Hopefully someone else with more time will be able to do a bit more with this port. :(

That being said, thanks again, AdamB, for all your great work.

Jaapjan
02-12-2008, 01:58 PM
Very nice! Now only if I had an iLiad, hrm? Perhaps when the community porting project takes off.

Post on your blog about it! Or here....

ericshliao
02-12-2008, 10:43 PM
It seems that this FBReader on iLiad can only deal with western character. Even though it supports several encoding schemes.

xianfox
02-13-2008, 06:21 AM
I'll echo my thanks to Adam B. for all the work he's put in on FBReader for us, but I'm also going to echo others thoughts that this takes FBReader in a less useful direction for me. I use FBReader primarily for CHM and HTML reading.

For now I'll be sticking with the older version.

yokos
02-14-2008, 08:44 AM
Thanks Adam B. for the update.
I will checkout your modded src. :iloveyou: :bookworm:

The first thing I changed was the default font. I don't like DejaVu Sans.
URW Bookman L looks much better, but tastes differ.
The information lives here: /mnt/settings/.FBReader/ui.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<group name="Indicator">
<group name="InfoDialog">
<group name="Options">
<group name="OptionsDialog">
<group name="Style">
<option name="Base:fontFamily" value="URW Bookman L"/>
<option name="Base:fontSize" value="12"/>
<option name="Base:lineSpacingPercent" value="150"/>
</group>
</config>

DeGodefroi
02-15-2008, 04:33 AM
Adam,
great job. I will give it a try!
I never used the library anyway, but I do miss the options page for changing font and changing font size (though a button can do that now).
thnx!

Mr. Goodbar
02-15-2008, 04:33 PM
Will this support prc or mobipocket files as well? I thought fbreader did, but i didn't see them in the supported file types listed.

GregS
02-15-2008, 08:01 PM
Adam, great job! Thanks.

One stupid question: How is a ssh shell opened?

One possible bug, the page numbers seem to jump with epub format. I am assuming that this is because actual page numbers are in the format, as in one case I can see the page flows, it is just the number that jumps (from 3 to 5).

wallcraft
02-15-2008, 08:45 PM
One possible bug, the page numbers seem to jump with epub format. I am assuming that this is because actual page numbers are in the format, as in one case I can see the page flows, it is just the number that jumps (from 3 to 5). This is probably a "feature", rather than a bug. The page number in FBReader is based on a fixed number of bytes per page, not on how much text is currently displayed per screen. So it is possible for the page number to jump by 2 (or not change at all) after a page turn.

The advantage of this is that the page number is independent of the font size (and the device). The disadvantage is that it isn't very similar to how we expect page numbers to behave.

JWLaRue
03-05-2008, 04:44 PM
Adam B. said:

Installation of this is simple. You'll need firmware 2.12 and Developer Shell access. Unzip the file, and copy anywhere on your iLiad. You will need to restart your iLiad when it prompts you. After you've restarted, you can delete the installation directory.

------------------------------------

Looks like I could use some help.....

I successfully downloaded the developers toolkit and the iLiad rebooted itself. Next I unzipped the FBreader kit onto an SD card, put the SD card in the iLiad and then attempted to open an RTF file. Nothing happens.

So then I manually executed the run.sh script......LED blinked green for a bit. After that I attempted to open the RTF file. Still nothing.

Since there was no reboot, I'm wondering if the "copy anywhere on your iLiad" means more than just placing it on an SD card that's inserted into the iLiad......

Anyone able to help?

-tnx,

Jeff

p.s. About the "contentlister".....I have inferred from the many postings that this is the same as the screen that has the heading "Books" on it. Is that correct?

JWLaRue
03-05-2008, 05:02 PM
Okay....figured it out.

Word caught me. I had saved the test book as an RTF, but the filename extension was still ".doc". Once changed to ".rtf" all is good! :)

-Jeff

Powdertoast
03-05-2008, 08:46 PM
I edited the registry.xml file to have FBReader open up txt files. All's well except I'd like to be able to change how text is flowed by FBReader if I need to. Short of editing the source code as Adam mentioned above so I can get into the options menu, is there a setting I can change in an FBReader xml file to alter the text flow in txt files?

bedwere
03-06-2008, 02:55 PM
How do you edit registry.xml? I would like to add Plucker (http://www.plkr.org/) support, as it used to work.

bedwere
03-08-2008, 02:11 PM
Ok, it's not working for me because I want to be able to read the plucker files. How do I remove it?

Adam B.
03-10-2008, 06:29 AM
You'll have to install mrxvt and type: "ipkg remove fbreader" (without quotes)

wallcraft
03-10-2008, 07:06 PM
You'll have to install mrxvt and type: "ipkg remove fbreader" This was already in Uninstal/fbreader for 0.8.4, so I have copied this directory to the attached zip file. Invoking this directory in the contentlister (any filesystem) will run the ipkg command for you.

However, I think it is the case that you should also do the following: cp /mnt/settings/registry.xml.orig /mnt/settings/registry/registry.xml

I have not put this in run.sh, because if it is wrong you will likely brick the iLiad (it will need reflashing). If you are brave enough to try it, I include this as run_registry.sh. Rename this run.sh before copying to the iLiad to completely uninstall fbreader and its registry entries. I have not tested this because I don't use FBReader via the registry.

Note that this will work for 0.8.4 with registry support added or with 0.8.14 with registry support built in.

voidcaller
03-10-2008, 07:10 PM
When reading fb2 books I consistently run into one of the following problems:
1) Long press on pagebar sends iLiad's green light blinking and nothing happens.
2) Short press on pagebar gets treated as long presses after reading 200+ pages, I set timing for long presses to 2 sec, but it did not change anything.
3) Pressing pagebar to go back one page, and going forward two pages will get me over sticky page in most cases.
4) Sometimes pagebar will not get you past a certain page, even with trick 3). I have to tap stylys on the bottom of the page to get the next page. Stylys tap work always, fast and without green light ever blinking, so why pagebar is having these problems?

bedwere
03-10-2008, 08:40 PM
I did what Adam suggested and then I installed the stand-alone version. It seems to be working fine.
I have a /mnt/settings/registry.xml.orig and also a /mnt/settings/registry/registry.xml.old
I'm a little hesitant in using either, since the old FBReader reads the plucker files just fine.

wallcraft
03-10-2008, 11:11 PM
I'm a little hesitant in using either, since the old FBReader reads the plucker files just fine. Are you reading them using FBReader's own file manager? If so, it probably does not matter that registry.xml has references to a version of FBReader that is not there any more.

bedwere
03-11-2008, 11:35 AM
Are you reading them using FBReader's own file manager? If so, it probably does not matter that registry.xml has references to a version of FBReader that is not there any more.
Yes, I am. :)

Alcuith
03-11-2008, 08:48 PM
FBReader just keeps rebooting the Iliad, but will not get to main screen. It flashed white and then starts rebooting again.
Any help, or do I have to reflash?

-Thomas-
03-17-2008, 07:02 PM
Thanks Adam for another great app :-D

Unfortunately I have to make a bug report, but I don't know whether it is FBReader or Contentlister related. If I open a book with FBreader, close it by using one of the bottom hard keys and reopen it, the program cannot be closed anymore and leaves me with the book on the screen.

I guess it has something to do with the way the contentlister calls FBReader, and I further guess those problems cannot be solved unless iRex releases the Contentlister source code :-D

wallcraft
03-17-2008, 09:18 PM
Unfortunately I have to make a bug report, but I don't know whether it is FBReader or Contentlister related. If I open a book with FBreader, close it by using one of the bottom hard keys and reopen it, the program cannot be closed anymore and leaves me with the book on the screen. See FBReader - trap buttons? (http://www.mobileread.com/forums/showthread.php?t=15238). The, not very elegant, fix for 0.8.4 is to add killall to run.sh (and then to exit using the Upper Left/Quit Button). FBReader is invoked by a shell script (fbreader.sh) in 8.1.14, so a similar approach may work here.

DeGodefroi
04-15-2008, 04:58 PM
I want to be able to set the margins. I am not happy with the menu less version. Adam, can you please include the menu? It could be a separate program to configure FBreader. It does not need to be fbreaders own menu/options system.

mvoosten
04-17-2008, 04:56 AM
Any way to skip xxx pages or to go directly to page y?:blink:

zerospinboson
04-17-2008, 06:48 AM
not a page number, no.. but using the stylus to click on the page bar should get you away from page 1 fairly quickly

mvoosten
04-17-2008, 07:20 AM
not a page number, no.. but using the stylus to click on the page bar should get you away from page 1 fairly quickly

Tried the last suggestion you mentioned with the stylus.. but wherever I click on the page bar it only skips 1 page at a time :(

voidcaller
04-18-2008, 09:53 AM
Same for me: stylus tap on the bottom of the screen or on the page bar only advances one page... Except sometimes stylus tap sends you to random page (skipping up to some hundred pages). This is very frustrating, especially when I am reading text file, converted to rtf (no chapters).

joblack
04-19-2008, 09:03 AM
I also like the toolbar (even that it isnīt very intuitive ;o)

kahlif
05-22-2008, 10:39 PM
Any way to get this for the book edition?

It is saying 2.12 is needed and I have 2.12.1

Is it as simple as changing Firmware_Script to 2.12.1? Please reply before I brick my new iliad... :)

Adam B.
05-23-2008, 07:25 AM
Is it as simple as changing Firmware_Script to 2.12.1? Please reply before I brick my new iliad... :)

Correct. It should work without a problem, as 2.12.1 is just a point release without major changes.

Worst case scenario, you'll have to reflash it yourself with a CF card.

cnbcad
05-23-2008, 03:40 PM
I edited the registry.xml file to have FBReader open up txt files.

Can someone tell me how to edit registry.xml to make FBReader open html files? I read primarily html and FBReader is the only thing that is usable I've found so far. (don't like mobipocket.)

I use Libronix Bible software and in order to publish a personal book for that system it needs to be written in html and then converted to its own format. Irex gives me ability to carry a copy of that book in its html version. :)

kahlif
05-23-2008, 08:25 PM
So, I changed the firmware_script to say 2.12.1 and then tried to run it. I get a progress bar on the bottom, then, after about 2 seconds, the screen just flashes. Nothing else. I restarted the iliad and it isn't installed. I also tried going into the folder and run the run.sh, but it does the same thing...

xianfox
05-24-2008, 07:10 AM
It sounds like you haven't installed iRex's Development Package on your iLiad yet. In order to run any third party software on the iLiad, the first thing you need to do is get the development package from iRex.

Log in to your iRex account, or create a new one, and then visit:

https://myirex.irexnet.com/user.php/developer

kahlif
05-24-2008, 09:34 AM
I followed Adam's noob guide and can run mrxvt, so I did install the dev package.

wallcraft
05-26-2008, 11:15 PM
Can someone tell me how to edit registry.xml to make FBReader open html files? I read primarily html and FBReader is the only thing that is usable I've found so far. (don't like mobipocket.) First install iliad-regutils (http://www.mobileread.com/forums/showthread.php?t=23668). Then install the attached application. It replaces .opf and .oeb with .zip and .oebzip as FBReader 0.8.14 file extensions. After this change, you can ZIP any single file that FBReader nominally supports but which isn't setup that way in the registry (e.g. .pdb, .txt, .htm) and it will be opened by FBReader from the .zip file. The .oebzip extension replaces .opf and .oeb (which I don't think would work before). If you have an OEB file (e.g. with an .opf), make all the associated files into a zip file and rename it .oebzip. For FBReader to read an ebook consisting of multiple HTML files it must first be made into a OEB file by adding an .opf metafile and creating an .oebzip.

Note that editing the registry is one of the more dangerous changes to the system. This works on my iLiad (and illustrates a better way to do the editing than the original FBReader installer), but be prepared to unbrick (http://www.mobileread.com/forums/showthread.php?t=17343) if something goes wrong. You can also try a dry run by commenting out (with #) 3 lines in run.sh:

# cp ./registry.xml.new /mnt/settings/registry/registry.xml
# mv manifest.xml install.xml
# mv done.xml manifest.xml
Then compare registry.xml.orig and registry.xml.new. If the new looks ok, uncomment out the lines and rerun.

wallcraft
05-30-2008, 04:46 PM
To customize the display of text on the screen, see Update Settings for FBReader 0.8.14 (http://www.mobileread.com/forums/showthread.php?t=24492).

nekokami
05-31-2008, 08:15 PM
I have it running now, and I guess I like it better than I thought I would. The absence of a battery indicator could be a problem, though. I'd rather have that than the clock. (I also need to edit my registry so FBReader is used to open Mobi, HTML, and TXT files. And wasn't there a workaround to pass LIT files through ConvertLit to FBReader? Or was it just to convert them, and only then open with FBReader?)

kran
06-06-2008, 02:28 AM
Hi,

I'm using FBReader to read epub files, but the buttons don't work properly : every use of a button (except the page bar) makes the green LED blinking, and make often the iLiad bugging (can't go back, and the only solution is re-boot).

Can I fix this ?

cnbcad
06-07-2008, 06:38 PM
Thanks Wallcraft for reply and to Adam for work on port. Thanks to community for all the help you've given me in the last few weeks as I've gotten to know my irex.

It seems to me the easiest way for me to assign custom actions to buttons is to edit the options.xml file directly. I have not, however, been able to find a list of action and key values.

Does anyone have a list?

wallcraft
06-07-2008, 07:11 PM
It seems to me the easiest way for me to assign custom actions to buttons is to edit the options.xml file directly. I have not, however, been able to find a list of action and key values. What I have:

<?xml version="1.0" encoding="UTF-8"?>
<config>
<group name="Keys">
<option name="Action0" value="nextTOCSection"/>
<option name="Action1" value="redo"/>
<option name="Action2" value="undo"/>
<option name="Action3" value="decreaseFont"/>
<option name="Action4" value="increaseFont"/>
<option name="Action5" value="cancel"/>
<option name="Action6" value="rotate"/>
<option name="Action7" value="cancel"/>
<option name="Action8" value="toc"/>
<option name="Action9" value="previousTOCSection"/>
<option name="Key0" value="&lt;DownArrow&gt;"/>
<option name="Key1" value="&lt;F1&gt;"/>
<option name="Key2" value="&lt;F2&gt;"/>
<option name="Key3" value="&lt;F3&gt;"/>
<option name="Key4" value="&lt;F4&gt;"/>
<option name="Key5" value="&lt;F5&gt;"/>
<option name="Key6" value="&lt;F6&gt;"/>
<option name="Key7" value="&lt;Home&gt;"/>
<option name="Key8" value="&lt;Return&gt;"/>
<option name="Key9" value="&lt;UpArrow&gt;"/>
<option name="Number" value="10"/>
</group>
<group name="Options">
<option name="QuitOnCancel" value="true"/>
</group>
<group name="Rotation">
<option name="Angle" value="-1"/>
</group>
<group name="SmallScrolling">
<option name="Mode" value="3"/>
<option name="PercentToScroll" value="100"/>
</group>
<group name="TapScrolling">
<option name="Enabled" value="true"/>
</group>
<group name="Web Browser">
<option name="Name" value="Browser"/>
</group>
</config>


The complete list of allowed action values is:

<node name="action">
<node name="none" value="None"/>
<node name="showLibrary" value="Show Library"/>
<node name="showRecent" value="Show Recent Books"/>
<node name="previousBook" value="Open Previous Book"/>
<node name="toc" value="Show Table of Contents"/>
<node name="gotoHome" value="Go to Home"/>
<node name="gotoSectionStart" value="Go to Start of Section"/>
<node name="gotoSectionEnd" value="Go to End of Section"/>
<node name="nextTOCSection" value="Go to Next TOC Section"/>
<node name="previousTOCSection" value="Go to Previous TOC Section"/>
<node name="largeScrollForward" value="Large Scroll Forward"/>
<node name="largeScrollBackward" value="Large Scroll Backward"/>
<node name="smallScrollForward" value="Small Scroll Forward"/>
<node name="smallScrollBackward" value="Small Scroll Backward"/>
<node name="undo" value="Undo"/>
<node name="redo" value="Redo"/>
<node name="copyToClipboard" value="Copy Selected Text to Clipboard"/>
<node name="openInDictionary" value="Open Selected Text in Dictionary"/>
<node name="clearSelection" value="Clear Selection"/>
<node name="search" value="Search"/>
<node name="findPrevious" value="Find Previous"/>
<node name="findNext" value="Find Next"/>
<node name="increaseFont" value="Increase Font Size"/>
<node name="decreaseFont" value="Decrease Font Size"/>
<node name="toggleIndicator" value="Toggle Position Indicator"/>
<node name="toggleFullscreen" value="Toggle Fullscreen Mode"/>
<node name="onFullscreen" value="Switch to Fullscreen Mode"/>
<node name="rotate" value="Rotate Screen"/>
<node name="preferences" value="Show Options Dialog"/>
<node name="bookInfo" value="Show Book Info Dialog"/>
<node name="addBook" value="Add Book"/>
<node name="cancel" value="Cancel"/>
<node name="quit" value="Quit"/>
</node>


Some of these won't make sense on the iLiad though. Note that version 0.8.04 uses numeric action codes, instead of the symbolic codes above, but it also has a menu to set these within FBReader.

kran
06-09-2008, 02:05 AM
Do the buttons work well on your iLiads ?


EDIT : Eureka ^^ ! I had problems because there was no TOC in my epub files... However, I still have problems with undo/redo, and sometimes I can't quit FBReader (unless I reboot :) )