Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 05-24-2009, 01:01 PM   #1
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Antiword for iLiad

Antiword official site: http://www.winfield.demon.nl/

This is an interesting program. It can convert MS Word file (.doc) to text and display the contents in console.
No GUI . If I can make antiword correctly convert Chinese text, I will make a GUI program to display the contents. It's not a tough task.

Install:
unpack the attached zip. Put the dir ".antiword" in "/home/root", and the file "antiword" in "/usr/bin" (or anywhere you want, just don't forget to chmod).

Usage:
In console mode, type "./antiword your_word_file.doc" and see the output.

PS.
Antiword also supports xml format output.
Attached Files
File Type: zip antiword.zip (220.5 KB, 358 views)

Last edited by ericshliao; 05-24-2009 at 01:15 PM.
ericshliao is offline   Reply With Quote
Old 05-24-2009, 01:27 PM   #2
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Alright, I figured out how to convert Chinese word doc correctly. Just use "-m utf-8.txt" option. It should be working for other non-English word files.
If someone (maybe I will) provide a GUI program to dispaly text contents, we can have a MS Word reader for iLiad.

I guess it should be easier to write a shell script to:
1. execute Antiword to convert doc to a temporary text file
2. execute Leafpad to read that temporary text file

Last edited by ericshliao; 05-24-2009 at 02:05 PM.
ericshliao is offline   Reply With Quote
Old 05-24-2009, 02:16 PM   #3
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
In essence, I have a MS Word reader now. Here is a package for you to try.
Special note: I don't know if the package work for original FW2.12. I have upgraded my GTK+ libs and I have no original FW2.12 to test. But I guess it should be working.

Install:
1. unpack "leafpad.zip" (with dir "leafpad") to /media/card/programs.
2. Unpack "antiword.zip" (with dir "antiword") to /usr/share.
3. modify your /mnt/registry/registry.xml, add these sections
Code:
        <application type="MSWORD">
            <appCategory>viewer</appCategory>
            <argMask>_FILENAME_</argMask>
            <execute>/media/card/programs/leafpad/run.sh</execute>
            <supportFormat>
                <extName>doc</extName>
            </supportFormat>
            <xResourceName>sh</xResourceName>
            <ipcChannel>14</ipcChannel>
            <appIconPath/>
        </application>
Code:
        <extensionInfo>
            <associateApp>MSWORD</associateApp>
            <extName>doc</extName>
            <extIcon>/usr/share/contentlister/Icon_doc.png</extIcon>
        </extensionInfo>
4. Reboot. You can open MS Word file from contentlister now.
Attached Files
File Type: zip leafpad.zip (325.2 KB, 364 views)
File Type: zip antiword.zip (115.3 KB, 365 views)

Last edited by ericshliao; 05-24-2009 at 02:19 PM.
ericshliao is offline   Reply With Quote
Old 05-24-2009, 11:11 PM   #4
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Ah, I forgot to put xepdmgr in the package. Please get Antartica's xepdmgr and put it in "/usr/bin".

If you have FBReader installed, you can use it as a text viewer (replace leafpad).
ericshliao is offline   Reply With Quote
Old 05-26-2009, 11:58 PM   #5
X. Trapnel
Enthusiast
X. Trapnel began at the beginning.
 
Posts: 32
Karma: 10
Join Date: May 2009
Location: Heidelberg, Germany
Device: iLiad (broken screen! cry), x61t tablet
Hrmmm - I thought I posted this reply last night, but I guess not!

Anyway, Eric, thanks tons for all this. I spent awhile trying to get this to work yesterday without (full) success-- at the end of my efforts clicking on a Word document made the thing flash, but not load into Leafpad, though it did create the tmp.txt. I think you're right that the GTK libraries are needed to get the new Leafpad to work; it gives some error about pango-something.

Is it (relatively) safe to put your library set in? You say something in that package about what you need to keep in - does that mean one should manually delete the others?

And if I use FBReader instead, would you suggest editing the /usr/bin/fbreader.sh script to handle .docs as a special case, following the method you use with the run.sh script in leafpad, or what?

Thanks tons for writing this!
X. Trapnel is offline   Reply With Quote
Old 05-27-2009, 12:24 AM   #6
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by X. Trapnel View Post
Is it (relatively) safe to put your library set in? You say something in that package about what you need to keep in - does that mean one should manually delete the others?
It's safe to put new libs, but dangerous to delete old libs. You have to manually delete some old libs. I won't suggest doing such action on your iLiad. Please make a bootable CF and test it on the CF. Only apply the upgrade on your iLiad after making sure the cf works fine.

Quote:
Originally Posted by X. Trapnel View Post
And if I use FBReader instead, would you suggest editing the /usr/bin/fbreader.sh script to handle .docs as a special case, following the method you use with the run.sh script in leafpad, or what?
It's not a good idea to modify /usr/bin/fbreader.sh. IMHO, modify leafpad/run.sh and copy the commands in /usr/bin/fbreader.sh will be a safer way. After making sure it's working, move it to /usr/bin and modify registry.xml as a separate script to open .doc with fbreader. Don't replace the original /usr/bin/fbreader.sh.

Added:
To use leafpad, xepdmgr is a must-have. I forgot to include it in the attachment. Please get it. It's not needed for FBReader 0.8.14.

Last edited by ericshliao; 05-27-2009 at 12:27 AM.
ericshliao is offline   Reply With Quote
Old 05-30-2009, 12:50 AM   #7
X. Trapnel
Enthusiast
X. Trapnel began at the beginning.
 
Posts: 32
Karma: 10
Join Date: May 2009
Location: Heidelberg, Germany
Device: iLiad (broken screen! cry), x61t tablet
Thanks!
X. Trapnel is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
iliad-regutils: Easy editing of the iLiad registry Martijn iRex 7 09-04-2010 06:12 AM
POLL to Iliad owners: Should people buy an Iliad or not? ali iRex 20 01-20-2010 06:11 AM
iLiad How to make iliad into a SSH server and connect with iLiad tudou331100 iRex Developer's Corner 21 02-06-2009 05:35 AM
Ended Iliad iRex + Iliad cover for sale in London acorral Flea Market 0 01-16-2009 06:09 AM
iLiad Book Edition slower than iLiad v2: different sw version? SecondoMe iRex 17 05-14-2008 01:42 PM


All times are GMT -4. The time now is 02:05 AM.


MobileRead.com is a privately owned, operated and funded community.