Skip to content

Commit

Permalink
Reorganize documentation improve separation of various pieces
Browse files Browse the repository at this point in the history
  • Loading branch information
dottedmag committed Aug 3, 2014
1 parent 969b8a0 commit 5d0d6d7
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 164 deletions.
23 changes: 23 additions & 0 deletions AUTHORS
@@ -0,0 +1,23 @@
Author
------

Rubens Ramos <rubensr@users.sourceforge.net>

Maintainer
----------

Mikhail Gusarov <dottedmag@dottedmag.net>

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
18 changes: 18 additions & 0 deletions HACKING
@@ -0,0 +1,18 @@
Hacking on pychm
================

PyCHM uses the functionality implemented in chmlib, a C-based library written by
Jed Wing. The functionality is lifted into Python using SWIG.

Additional requirements
-----------------------

* SWIG if you want to regenerate the sources from the interface file.

Regenerating SWIG sources
-------------------------

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
(tested with SWIG 1.13.18).
22 changes: 22 additions & 0 deletions INSTALL
@@ -0,0 +1,22 @@
Installing pychm
================

Requirements
------------

* Python >= 2.2
* chmlib
* A working C compiler

Installation from sources
-------------------------

python setup.py install

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:

CPATH=<directory where chmlib include files are> \
LIBRARY_PATH=<directory where the chmlib library is> \
python setup.py install
10 changes: 0 additions & 10 deletions PKG-INFO

This file was deleted.

143 changes: 13 additions & 130 deletions README
@@ -1,138 +1,21 @@
PyCHM PyCHM
=====


Version 0.8.4 PyCHM is a Python library to manipulate CHM files (Microsoft HTML Help).


Copyright (C) 2003-2006 Rubens Ramos <rubensr@users.sourceforge.net> The chm package contains four modules:


Please report bugs or suggestions for improvements to the above * chm.chm: High-level support for CHM archives.
address or follow the instructions at: * chm.extra: Extra utility functions - full-text search support,

encoding detection.
http://gnochm.sourceforge.net * chm._chmlib: Low level wrappers around the chmlib API (C part).

* chm.chmlib: Low level wrappers around the chmlib API (Python part).
----------------------------------------------------------------------------
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 License
------- -------


This library is licensed under the GPL. Please refer to the COPYING file Copyright (C) 2003-2006 Rubens Ramos <rubensr@users.sourceforge.net>
for more details. Copyright (C) 2014 Mikhail Gusarov <dottedmag@dottedmag.net>

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$ This library is licensed under the GPLv2+. Please refer to the COPYING file for
more details.
14 changes: 0 additions & 14 deletions freshmeat.txt

This file was deleted.

10 changes: 0 additions & 10 deletions setup.cfg

This file was deleted.

0 comments on commit 5d0d6d7

Please sign in to comment.