betabug... Sascha Welter

home english | home deutsch | Site Map | Sascha | Kontakt | Pro | Weblog | Wiki

25 May 2012

Convert CHM to epub with Open Source Software

Command line information

Speaking of ebooks and technical manuals in my last post: I had some stuff that was in "CHM" format. Now in theory calibre can convert from CHM to epub, but it never worked for me. All I ever got was the contents and maybe the first page. Given a bit of command line use, there was an easy solution for me.

I used chmlib (in my case the OpenBSD chmlib-0.40p0 package) and htmldoc (the htmldoc-1.8.27p6 package). First with extract_chmLib the chm file was converted to a directory full of html files. In the next step I ran htmldoc with the --continuous option to make one big html file out of all the chapters and parts. In this case the parts were named so that they went in proper order, I don't know if that is usually so. I only had to do some minimal cleanup in the html.

This big html file would already have worked in the ebook reader, but I went one step further and converted it with calibre to epub format.

Posted by betabug at 10:20 | Comments (0) | Trackbacks (0)
ch athens
Life in Athens (Greece) for a foreigner from the other side of the mountains. And with an interest in digital life and the feeling of change in a big city. Multilingual English - German - Greek.
Main blog page
Recent Entries
Best of
Some of the most sought after posts, judging from access logs and search engine queries.

Apple & Macintosh:
Security & Privacy:
Misc technical:
Athens for tourists and visitors:
Life in general:
<< Back to Bookeen | Main | Back To The Square >>
There are no comments.
You can trackback to:
There are no trackbacks.