Final Release of HTMLgen 2.1 
Author Message
 Final Release of HTMLgen 2.1

Available now in the python Starship library is the latest release of HTMLgen.
The beta version had a couple bugs that have been fixed.

http://www.*-*-*.com/

HTMLgen is a class library corresponding to the HTML 3.2 spec.  It includes
several tools including an image sizing tool based on Fredrik Lundh's Python
Imaging Library.

[Moderator's Note: further info from the HTMLgen web site:

WHAT'S IT FOR?

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 out into consistently structured web
pages. Of course, CGI scripts written in Python can take advantage of these
classes as well.

ABOUT THIS RELEASE

This is the 2.1 release. It's a minor release with a new class called
TemplateDocument and several bug fixes. The TemplateDocument class provides
a simple way of generating web pages based on a template containing tags
which are replaced at run time with text of your choice. It uses a
dictionary to provide the substitution mapping. This class is only available
with Python 1.5 or newer as it makes use of the re module and the new get
method on dictionaries. The rest of HTMLgen should work fine with 1.4.

A new utility module imgsize provides a function to quickly compute the
width and height of image files. It makes use of a small subset of Fredrik
Lundh's excellent PIL package to support GIF, JPEG, and PNG file format
headers. If you have PIL installed at your site, that copy is used
automatically instead of the modules bundled with HTMLgen. The Image object
in HTMLgen makes use of this new capability to automatically compute the
images size properties if the files exist when HTMLgen is running. Another
utility script is bundled with HTMLgen called imgfix.py. It makes use of the
imgsize routine to scan HTML files looking for IMG tags without correct
height/width properties and fixes them. See imgfix.py source for
instructions on its use.

The simple HTML tag classes all now inherit from AbstractTag or
AbstractTagSingle. The former base class provides generic support for HTML
element attributes and container functions such as append, prepend, copy,
and a new method called markup. The markup method is available to scan
through the text contained in the object with a regular expression you
furnish and perform a string substitution on the matching text. The method
accesses two external functions - one written to support syntax of the regex
module and the other to support syntax and objects from the new re module.
For example, once you have a Para object "P" you could substitute all
bracketed text with a bold font as follows:

  p = Para('some text...')
  strong = Strong()
  p.markup( "(\[[^]]*\])", strong, regex_type="re" )

Note that the regular expression pattern or object given to this method must
have a group defined. It treats group 1 as the target of the substitution.
The above also demonstrates a new feature supplied by the AbstractTag class.
Instances now can be used a functions through use of it's __call__ method.
So you can now configure an HTMLgen class instance with all attributes set
and then reuse the instance as a text markup function.

The release can be downloaded from the Starship Web site.

--- end of additional info added by moderator.]

==
Robin K. Friedrich     Houston, Texas
  Python Professional Services, Inc.

      http://www.*-*-*.com/

           Python Rules!

--
-------- comp.lang.python.announce (moderated) --------

Python Language Home Page:   http://www.*-*-*.com/
-------------------------------------------------------



Fri, 01 Dec 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. HTMLgen 2.1 Final Released.

2. RELEASED Mailman 2.1 - final

3. ANNOUNCE: Python 2.1 final release

4. Cygwin Python Distribution (was ANNOUNCE: Python 2.1 final release)

5. Cygwin Python Distribution (was ANNOUNCE: Python 2.1 final release)

6. ANNOUNCE: Python 2.1 final release

7. Cygwin Python Distribution (was ANNOUNCE: Python 2.1 final release)

8. HTMLgen 2.1

9. HTMLgen 2.1

10. ANNOUNCE: HTMLgen 2.1

11. NEW RELEASE: Linz Oberon V4, Release 2.1

12. db Reports 2.1 is now Final

 

 
Powered by phpBB® Forum Software