CompileTemplateTable of Contents
PERL Template CompilerCompileTemplatePERL Template CompilerThis script compiles the Komodo templates into web pages. Each web pag displays the template and the relevant prompts. Filling in the prompt and clicking the SUBMIT button brings up a text page containing th code to copy into your code editor.When formatting the template for display, comments are displayed usin thecodeComment style and template variables using the codeVarpre element with th
codeNormal style.The templates use the notation [[%askn:prompt]] for mos
variables. In more complex templates, there are also flag prompt
and if-constructs. This notation is designed to be compatible wit
the Komodo template/snippet facility.Each template produces two output files: the web page itself and
copy of the template that the composition script can to form th
output code. The web page has the extension .html and th
template copy has the extension .txt.There are two positional parameters: the name of the directory containin
the template files (usually somewhere in the source code tree) and th
name of the output directory into which the template files should be stored
The template files will be placed in a subdirectory called Helpers unde
the output directory. This makes them easier to find.The currently-supported command-line options are as follows.userName suffix to be used for log files. If omitted, the PID is used.traceNumeric trace level. A higher trace level causes more messages to appear. Th
default trace level is 2. Tracing will be directly to the standard outpu
as well as to a traceUser.log file in the FIG temporary directory
where User is the value of the user option above.backgroundSave the standard and error output to files. The files will be create
in the FIG temporary directory and will be named errUser.log an
outUser.log, respectively, where User is the value of th
user option above.hDisplay this command's parameters and options.phonePhone number to message when the script is complete.styleURL for the style file. The default is ../Georgia.css.CompileTemplateCompileTemplate($ih, $oh, $copyName, $templateName, $style);Compile a template from an input stream into a web page that can be used to generate code fro
the template. The web page will contain a display of the template file plus a form allowing th
user to enter the values of various template variables. The template content is read from
file whose name is stored as a hidden variable in the form.ihOpen handle for the input file (template).ohOpen handle for the output file (interactive web page).copyNameFully-qualified name of the server file that contains the template text.templateNameName of the template (for display purposes).styleStyle URL to use for the output web page.