Home | Trees | Indices | Help |
---|
|
object --+ | generic.TemplateProcessor --+ | SabxProcessor
The SabxProcessor
sub-classes the TemplateProcessor class. It provides an extendable
framework for processing SABX 1.0 files with Jinja2 templates. It builds
on the generic TemplateProcessor by adding an "infile" option
to specify the SABX 1.0 file and by providing a routine for parsing the
SABX 1.0 data.
Sample Code::
from sabx10.templating import SabxProcessor SabxProcessor().process()
Sample Usage::
$ sample.py -i sample.sabx -o sample.out sample.jinja2
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
file
|
in_file handle to file to read SABX 1.0 data from |
||
dict
|
sabxdic holding all the data for the given SABX 1.0 file
|
||
Inherited from |
|
|||
Inherited from |
|
Adds the "infile" command-line option specifying the SABX 1.0 file to read from to the options specified in the base class.
|
Parse the specified SABX 1.0 file and save its object representation. Over-ride this in sub-classes to modify the SABX data before passing it to the template.
|
Process the SABX 1.0 data into the template. First, delete the input file if it is the same as the output file. This way you can read an SABX 1.0 file and write the template output to the same file name, effectively over-writing the file.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sat May 1 23:03:31 2010 | http://epydoc.sourceforge.net |