Next
/
Previous
/ Shipman's Home Sweet Homepage
/ Site map
Cleanroom examples: PyStyler
I wrote the original WebStyler program in the Icon
language to help me maintain the 500-plus Web pages of the
TCC help system. It has
also been used to administer
New Mexico Tech's official pages
since 1996.
- For program externals, see the
specification.
- The program is written in the Python programming language
(see the local
Python help page).
- Here's the main program,
pystyler.py
- Some of my
standard objects are used throughout
this program. In particular:
- The
Log object handles error logging
and the counting of errors by class.
- The
Scan object deals with parsing
and error messages relating to parse errors.
- Here's a list of the objects specific to WebStyler:
- The
PathMap object
represents the PathMap file and handles the decoding
of short names.
- The
Plan
object represents the Plan file.
- Each
Topic
object represents one line of the Plan file.
- Each
LinkVar
object
describes one use of an <RR> tag, whose variant link text
must be written into the ``navigational shock report.''
- The
TmplPool
object is a cache for Template objects.
- Each
Template
object describes one template file. This object also uses the
OpenCond
object for parsing templates, and the
Condition,
IfStack, and
TToken
objects to control template expansion.
- Each input file is represented by a
Body
object. This object uses the
Target
object to represent places where links can point, and it uses the
Webtag
object to parse HTML tags in the input file.
The previous version
PyStyler is a complete rewrite of a nearly identical
earlier version written in Icon. See the
WebStyler page for its documentation
and source.
Next: Cleanroom examples: WebStyler
See also: Example programs written in Cleanroom style
Site map
John W. Shipman,
john@nmt.edu
Last updated: 1996/11/01 21:30:09
URL: http://www.nmt.edu/~shipman/soft/clean/pystyler.html