                    README for HTMLgen 2.1

HTMLgen is a class library for the generation of HTML documents with
Python scripts. It's used when you want to create HTML pages
containing information which changes from time to time. For example
you might want to have a page which provides an overall system summary
of data collected nightly. Or maybe you have a catalog of data and
images that you would like formed into a spiffy set of web pages for
the world to browse. Python is a great scripting language for these
tasks and with HTMLgen it's very straightforward to construct objects
which are rendered into consistently structured web pages. Of course,
CGI scripts written in Python can take advantage of these classes as
well.

This software should work on both Unix and Macintosh and Win32
platforms running Python 1.3 or greater. (HTMLcalendar.py requires
1.4) If you are running 1.5 the new re and string module enhancements
are used for performance. The new TemplateDocument class is only
available in Python 1.5 or newer. The HTMLgen 3.0 version will
probably require 1.5+.


CHANGES SINCE 2.0.6

As mentioned above, I've added a little TemplateDocument class to
streamline generation of complex but largely similar web pages.
Currently it's pretty simple but in the future I'll be making some
enhancements as users request them.

I've bundled a few modules from Fredrik Lundh's PIL system to provide
a simple function to determine image file dimensions automatically.
Previously I just had a tool to calculate this for GIFs only. Now JPEG
and PNG formats are supported as well. See the imgsize module. If you
have PIL already it will be used in lieu of these bundled pieces.

The MailTo class has a nice little enhancement to trip up email
address spiders.  It randomly substitutes the HTML encoding of several
characters in the email output, which makes it nontrivial to parse but
appears and works fine from browsers.


INSTALLATION

Unpack the tar file. This will create a directory called HTMLgen which
contains the HTMLgen.py, HTMLcolors.py, HTMLutil.py, HTMLcalendar.py,
imgsize.py, barchart.py, StickyForm.py and HTMLtest.py as well as
several bundled PIL modules plus three directories (images/ , html/ ,
data/) containing all supporting files and on-line documentation.

At this point you may want to browse the on-line HTML
documentation. Just load the file HTMLgen/html/main.html into your
favorite frame-capable browser and bookmark it.

If you have GNU make you can run the test and install targets of
the provided Makefile. For example:
cd HTMLgen
gmake test
gmake install

Without GNU make:

To test the distribution you can run the HTMLtest.test() function.

cd HTMLgen
python

>>> import HTMLtest
>>> HTMLtest.test()
wrote: "./html/overview.html"
wrote: "./html/document.html"
wrote: "./html/lists.html"
wrote: "./html/top-frames.html"
wrote: "./html/frames.html"
wrote: "./html/tables.html"
wrote: "./html/forms.html"
wrote: "./html/imagesmaps.html"
wrote: "./html/scripts.html"
wrote: "./html/independence.html"
wrote: "./html/parrot.html"

These generated files are for the on-line documentation mentioned
above. The only thing left at this point will be to move/copy the
*.py* files into your python path.
That's it.

Send comments and questions to me at Robin.Friedrich@PDQ.net.

Robin Friedrich
Houston, Texas, USA

May 28, 1998
