View Single Post
Old 07-28-2008, 10:27 AM   #7
acidzebra
Liseuse Lover
acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.
 
acidzebra's Avatar
 
Posts: 869
Karma: 1035404
Join Date: Jul 2008
Location: Netherlands
Device: PRS-505
Okay, I tried it with an old CHM file I had lying around. Used CHMdecoder, and this works okay. I got a index.htm (which is an empty frameset with two frames, one for the TOC and one for the text), and a subfolder with all the chapters, named "ch01.htm", "ch02.htm" and so on.

Now trying to convert index.htm is useless. But converting the chapters is very possible, although you have to do it from a command prompt. So open one, navigate to the folder with all the ch0X.htm files, and type the following:

html2lrf --link-levels=30 ch00.htm
(assuming you have Calibre installed)

The --link-levels option is a little tricky, as it will traverse any links between the local files (thus making all these chXX.htm files into one big lrf) so you might want to play with the values a little. Anything too small, and you will not get the entire book. Too big, and it will recurse several times over creating a much bigger file than needed.

There is also the matter of chapters and a table of content. I have not solved this issue yet, but I opened a thread on the Calibre section:
https://www.mobileread.com/forums/showthread.php?t=26985

but for now you will end up with a massive LRF file with no TOC/chapters, although it will maintain the "previous/next" links you find in the htm files.

Last edited by acidzebra; 07-28-2008 at 10:30 AM.
acidzebra is offline   Reply With Quote