Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert CHM file to CSV or SQL [closed]

Tags:

sql

csv

chm

I am looking to create a Facebook App and the data I want to use is not available except for in CHM format.

Is it possible to convert CHM files into CSV or SQL? Do we have any existing tools for this?

Thanks for the help as always.

like image 616
Atif Avatar asked Apr 14 '10 13:04

Atif


2 Answers

BTW, you should specify the language (English, Arabic...) in which you wish to build this dataset, as this affect both the selection of book sources and the conversion utilities.

Identifiying data content sources:
Interestingly, and for all the [interactive] online Hadeeth Search tools such as the one on the
CRCC's Compendium of Muslim Texts site (original from MSA West, but somehow not available/working at MSA site anymore), there doesn't seem to be any download-able version of the underlying databases!
There are several online versions of books themselves, in particular the popular ones you mention, but you would then need to parse and index them properly in order to retain the references etc. Also, going "back" to the books, you would have to relate them yourself.

With regards to converting CHM files...
There's no open source or freeware program that I'm aware of, but the shareware ABC Amber CHM converter (c. $25.00) appears to be the gold standard for that purpose.
I only had passing exposure to this software a couple of years ago, for a one-time conversion job similar to the one you are contemplating. The Amber converter "did the trick"; Luckily the underlying structure of the help pages exposed much regularity which allowed a relatively straight forward tabulation into CSV/database fields.
ABC Amber converter supports many languages, including Arabic (but I used it for English only).

like image 70
mjv Avatar answered Nov 13 '22 17:11

mjv


There is a wellknown open source *nix lib called libchm on which most *nix chm viewers are based. It comes with a tool to decompress .chm to its .html originals (from which you then would have to convert the html tables to .csv)

Lazarus/Free Pascal also has libs, that even can write, but afaik no readily made "chm compiler" tool.

like image 22
Marco van de Voort Avatar answered Nov 13 '22 16:11

Marco van de Voort