htmlgen-2.2.2.orig/ 40755 2013 32512 0 6752067724 12415 5 ustar doko smile htmlgen-2.2.2.orig/README 100644 2013 32512 6443 6533336203 13365 0 ustar doko smile 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
htmlgen-2.2.2.orig/Makefile 100644 2013 32512 4027 6706771600 14147 0 ustar doko smile #'$Id: Makefile,v 1.1 1998/03/19 18:41:05 friedric Exp friedric $'
# Makefile for HTMLgen (requires gnu make)
#
VERSION = 2_2
PACKAGE = HTMLgen
DOCS= README Makefile ChangeLog HTML.rc HTMLgen.rc appt.txt
MODULES= HTMLgen.py HTMLcolors.py HTMLutil.py HTMLcalendar.py \
barchart.py colorcube.py imgsize.py NavLinks.py Formtools.py
MODULESC= HTMLgen.pyc HTMLcolors.pyc HTMLutil.pyc HTMLcalendar.pyc \
barchart.pyc colorcube.pyc imgsize.pyc NavLinks.pyc Formtools.pyc
PIL= ImageH.py ImageFileH.py ImagePaletteH.py \
GifImagePluginH.py JpegImagePluginH.py PngImagePluginH.py
PILC= ImageH.pyc ImageFileH.pyc ImagePaletteH.pyc \
GifImagePluginH.pyc JpegImagePluginH.pyc PngImagePluginH.pyc
EXTRAS= StickyForm.py cgiapp.py installp.py imgfix.py
SUBDIRS= image html data
TEST= HTMLtest.py
DIST_DOCS = $(addprefix HTMLgen/, $(DOCS))
DIST_MODULES = $(addprefix HTMLgen/, $(MODULES) $(PIL) $(EXTRAS))
DIST_SUBDIRS = $(addprefix HTMLgen/, $(SUBDIRS))
DIST_TEST = $(addprefix HTMLgen/, $(TEST))
DIST_FILES= $(DIST_DOCS) $(DIST_MODULES) $(DIST_TEST) $(DIST_SUBDIRS)
all:
@echo Type \"make install\" to install HTMLgen.
@echo The modules will be put in site-packages.
@echo
@echo Other targets include: test gendoc compileall dist bigdist
dist: test gendoc bigdist
bigdist:
(cd ..; tar chf - $(DIST_FILES)) | gzip --best > $(PACKAGE).tgz
uuencode $(PACKAGE).tgz $(PACKAGE).tgz > $(PACKAGE).tgz.uu
smalldist:
(cd ..; tar chf - $(DIST_MODULES) ) | gzip --best > small$(PACKAGE).tgz
uuencode small$(PACKAGE).tgz small$(PACKAGE).tgz > small$(PACKAGE).tgz.uu
test:
python $(TEST)
gendoc:
gendoc -i -d html -f HTMLg -h HTMLgen $(MODULES) $(EXTRAS)
python HTMLutil.py -s
compileall:
python -c "import compileall; compileall.compile_dir('.',0)"
install: compileall
python installp.py -f $(MODULES) $(MODULESC) $(PIL) $(PILC)
@echo Installation of $(PACKAGE) done.
checkin:
ci -u $(MODULES) $(PIL) $(EXTRAS) $(TEST) Makefile
release:
rcs -N$(VERSION): $(MODULES) $(PIL) $(EXTRAS) $(TEST) Makefile
htmlgen-2.2.2.orig/ChangeLog 100644 2013 32512 15520 6506301171 14267 0 ustar doko smile Wed Mar 25 16:16:31 1998 Robin K. Friedrich
* HTMLgen.py (MailTo.antispam): Added antispam processing to addresses.
Sat Mar 14 03:39:37 1998 Robin K. Friedrich
* HTMLgen.py (TemplateDocument): Added TemplateDocument class
Tue Mar 3 12:50:35 1998 Robin K. Friedrich
* HTMLgen.py (List.__getslice__): Made slicing List objects retrun
new List objects.
* HTMLgen.py (List.multi_column_table): Added support for rendering
Lists in multiple columns. Uses a table to do this. New attributes
"columns" and "bgcolor" added.
Sat Feb 28 12:29:53 1998 Robin K. Friedrich
* colorcube.py: Added new module to create tables illustrating the
web safe colorcube used by Netscape.
Mon Jan 19 15:01:55 1998 Robin K. Friedrich
* HTMLgen.py (Input.__str__): Added test for 0 value.
(Table.__str__): if cell_line_breaks is set, string values in
cells have newlines replaced with and no HTML escapes are
performed.
Sun Dec 14 10:12:07 1997 Robin K. Friedrich
* HTMLgen.py (AbstractTagSingle.__setattr__): Eliminated the
contents list as it wasn't needed anyway.
* HTMLgen.py (Image): Rewrote Image class as a subclass of
AbstractTagSingle. Added some missing attributes such as hspace,
etc. Increment version to 2.0.5.
Sun Nov 30 09:57:41 1997 Robin K. Friedrich
* HTMLgen.py (markup_regex): Fixed excessive use if the is
operator for string comparison causing HTMLtest to fail in Python
1.4. Curious it worked fine in 1.5.
Sat Nov 29 05:00:01 1997 Robin K. Friedrich
* HTMLgen.py (markup_regex): Fixed index bug in both markup
routines(markup_re as well). It was chopping off the last
character. Increment version to 2.0.3.
* HTMLtest.py (sample1): Changed the sample1() routine to use only
one class instance per markup call.
* HTMLgen.py (2.0.2): I suppose I should restart writing these
notes. :-) Changed the Heading class to use the AbstractTag base
class. This allows use of valid keyword arguments.
Tue Mar 18 11:21:14 1997 Robin Friedrich
* StickyForm.py: Added Amos' module for persistant Forms. Added
optional support for cPickle as an optimization if it's available
on the user's system. Not really tested yet.
Fri Dec 20 13:02:57 1996 Robin Friedrich
* HTMLgen.py (Document.write): Inhibit printing the success echo
if the class is used in a CGI manner.
Thu Dec 5 13:20:52 1996 Robin Friedrich
* HTMLgen.py (Document.__repr__): Changed to a string
interpolation technique to create the Document contents. Mike
McLay's idea.
Mon Dec 2 09:01:26 1996 Robin Friedrich
* HTMLgen.py (__init__): Changed several constructor parameters to
make sure default values are always provided. Necessary to all all
class instances to be pickled.
Tue Nov 26 11:53:42 1996 Robin Friedrich
* HTMLgen.py (Image.calc_rel_path): New method which calculates
relative directory path to the absolute location of the image file
given a starting directory. Also added new attributes 'absolute' and
'prefix' to support this feature.
* HTMLgen.py (relpath): Added utility function which computes a
relative path from one directory to another.
Fri Nov 15 16:47:44 1996 Robin Friedrich
* HTMLgen.py (Image): Added capability to handle tuple argument
and unpack it into constituent file, width, height values.
* HTMLgen.py (getgifsize): Added this function snagged from
internet which determines size of GIF files. cool.
Fri Nov 8 11:19:12 1996 Robin Friedrich
* HTMLgen.py (Document.header): banner can now be a string filename
Tue Oct 1 10:08:14 1996 Robin Friedrich
* HTMLutil.py: placed the pysrc_marker functions in a new module
HTMLutil.py.
Tue Sep 24 11:58:44 1996 Robin Friedrich
* HTMLgen.py (FONT): Added support for face attribute.
Thu Sep 19 13:00:49 1996 Robin Friedrich
* HTMLgen.py (DOCUMENT): Added alinkcolor attribute.
Tue Sep 17 08:11:21 1996 Robin Friedrich
* HTMLgen.py (CGI): patch from Peter to add support for
javascripts in Forms. Also added bgcolor attribute to all the
TableLite classes.
(SPACER): added Spacer class. supported by Navigator 3.
Fri Sep 13 18:21:19 1996 Robin Friedrich
* pysrc_marker.py (markup): added pysrc_marker module.
Thu Sep 5 14:16:29 1996 Robin Friedrich
* HTMLgen.py: (Frame): Fixed bug in Frame class.
Thu Sep 1 14:13:47 1996 Robin Friedrich
* HTMLgen.py (MAILTO): Added Mailto class.
* HTMLgen.py (Multicol): Added Multi-column support class.
Sat Aug 24 15:23:48 1996 Robin Friedrich
* HTMLgen.py (Script): Applied patch for Javascript support from Peter.
Mon Aug 12 14:01:27 1996 Robin Friedrich
* HTMLgen.py: (URL): incorporate logic from posixpath directly so
that I don't need to import a module which doesn't exist on Macs.
(List): rewrote the family of classes used for list
processing. Now they all inherit from the List base class and are
all fully nestable.
Thu Aug 1 09:04:12 1996 Robin Friedrich
* HTMLgen.py: (TableLite) Added TableLite class and supporting
classes TD TH TR and Caption to populate it.
Fri Jul 19 09:57:19 1996 Robin Friedrich
* HTMLgen.py (Select): Changed Select class to allow list of tuple
input. The second item of the tuple is used to place a value
attribute to the