View Single Post
Old 02-21-2010, 09:05 AM   #3
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
I would prefer HTML over RTF as your intermediary format, especially if going to ePub (which is just zipped HTML).

You can use OpenOffice to convert to HTML or RTF certainly. I think there's a way of making it do on the commandline, but I've never managed to get it to work. However, it's fairly easy with AbiWord (Ubuntu package abiword).

The following shell command will batch convert every .doc and .docx in a given folder to .epub (with AbiWord and calibe installed):

(Be careful of files ending in .html or .epub with the same names already in the same folder; I haven't bothered watching for them.)

Quote:
for i in *.doc ; do abiword --to=html "$i" ; ebook-convert "${i%.doc}.html" "${i%.doc}.epub" --output-profile="sony" ; done
I don't know much about *.chm files, but if AbiWord can open them (likely), changing *.doc to *.chm in the above will do the trick.

Last edited by frabjous; 02-21-2010 at 09:11 AM.
frabjous is offline   Reply With Quote