PyCHM Version 0.8.4 Copyright (C) 2003-2006 Rubens Ramos <rubensr@users.sourceforge.net> Please report bugs or suggestions for improvements to the above address or follow the instructions at: http://gnochm.sourceforge.net ---------------------------------------------------------------------------- Summary ------- PyCHM contains a Python package named chm to manipulate CHM archive. It uses the functionality implemented in chmlib, a C-based library written by Jed Wing. Quoted from Jed's README: "chmlib is a small library designed for accessing MS ITSF files. The ITSF file format is used for Microsoft Html Help files (.chm), which have been the predominant medium for software documentation from Microsoft during the past several years, having superceded the previously used .hlp file format." The chm package contains four modules: * chm._chmlib: Low level wrappers around the chmlib API, generated by SWIG <jedwin@ugcs.caltech.edu>. * chm.chmlib: Low level wrappers around the chmlib API, also generated by SWIG; * chm.extra: Extra utility functions - right now, it contains a function to perform full-text search support to extract LCID. * chm.chm: High-level support for CHM archives, using the functions from the modules above. Requirements ------------ * Python >= 2.2 (older versions may work, I dont know) * chmlib * A working C compiler if you plan to build the sources. * SWIG *if* you really want to regenerate the sources from the interface file (but this is not needed - keep reading). To get SWIG, go to http://www.swig.org Installation ------------ First you need to get Python and chmlib at: http://www.python.org http://66.93.236.84/~jedwin/projects/chmlib and install both of these packages. Installation from sources ------------------------- If you are getting one of the source files, then all you need to do is unpack it, 'cd' to the newly created 'pychm-X.X.X' directory and type: python setup.py install And that should be all. Note that you will probably need to have admin privileges to do that if you are planning to install it on the base python modules directory. If you are feeling adventurous and want to re-generate the C source file from the SWIG interface file (src/swig_chm.i), then all you need to do is modify the setup.py file and substitute src/swig_chm.c with src/swig_chm.i (I used SWIG 1.13.18 to develop this). Tip - if the compilation is failing because your chmlib is installed somewhere not visible to gcc, then you can use the cPATH and LIBRARY_PATH environment variables before trying to compile: (if you are using bash, or sh-like shells) export CPATH=<directory where chmlib include files are> export LIBRARY_PATH=<directory where the chmlib library is> or (if you are using tcsh, csh, etc) setenv CPATH <directory where chmlib include files are> setenv LIBRARY_PATH <directory where the chmlib library is> Installation from binaries -------------------------- Just grab your favorite binary format, and install it according to your system's procedures (since you know which format you want, I am assuming you know how to install it :) RPM installation ---------------- Just do (but make sure you have chmlib installed first): rpm -i pychm-X.X.X-X.i386.rpm Acknowledgements ---------------- This work would not have been possible without the existence of chmlib, developed by Jed Wing, and a lot of the python code used to parse the contents tree and to decode the index files was heavily based on the code implemented by Razvan Cojocaru <razvanco@gmx.net> for the xCHM viewer. Bug reports: can3p, Chang (changshu), Hristo Iliev, Carlos Liu, Torsten Marek, Dmitri (nebraskin), Fredrik de Vibe, Glenn Washburn FAQ --- Q. I want to re-generate the C source from the swig interface file! How do I do that? A. Modify the setup.py file and substitute src/swig_chm.c with src/swig_chm.i (I used SWIG 1.13.18 to develop this). License ------- This library is licensed under the GPL. Please refer to the COPYING file for more details. Bugs ---- If you think you found a bug, or have suggestions for improvements, you can contact the author at: Rubens Ramos <rubensr@users.sourceforge.net> $Id: README,v 1.14 2006/11/11 06:43:17 rubensr Exp $