htmlc

Langue: en

Version: September 01, 2004 (mandriva - 01/05/08)

Section: 1 (Commandes utilisateur)

NAME

htmlc -- an HTML template compiler and generator (http://caml.inria.fr/htmlc/) with file inclusion, variable substitution and Server Side Includes static execution.

VERSION

Htmlc version 1.60

SYNOPSIS

htmlc [options][sourcefile][targetfile]...

DESCRIPTION

The htmlc compiler is a HTML page generator. It parses a HTML source template with compiler directives and produces a regular HTML file.

htmlc supports arbitrary file inclusion (possibly recursive), various predefined computation operators (e.g. file size, or date of last modification of files), and more generally the textual output of arbitrary Unix commands.

htmlc also supports variables expansion into the template files: the variable bindings can be defined in a shared environment file or directly written into the template file. System environment variables expansion is also available.

In brief, htmlc allows fully static execution of Server Side Include directives. It also implements a lot of supplementary features that ease the writing and maintenance of a Web site. The compilation approach used in htmlc allows a lot of static verification during the generation of the HTML pages of a Web site. The neat result is that errors in the conception of pages are detected very early, way before the Web site is made available to the public. An additional benefit of the compilation approach is to drastically lighten the HTTP server load: the server no more needs to parse the pages and expanse the directives in them again and again for each request.

htmlc also shines as the back end of CGI (Common Gateway Interface) programs to generate the final HTML answer page of the program. The programmer has just to write an HTML template with some htmlc variables to be filled with the specific part of the answer. The CGI program then creates a set of bindings for the variables, and calls htmlc to expand the template to finally return a complete answer where the variables have been expanded according to the results of the CGI program computation.

CURRENTLY SUPPORTED FEATURES:

- File inclusion

- Verbatim file inclusion (HTML entities are properly expanded)

- Size and last modification date of files

- Variable expansion

- System environment variable expansion

- Unix command launching with the standard output redirected to the compiled file

OPTIONS

Options are :
-I <dirname>
Add directory <dirname> in front of the list of directories searched for include files.
-w
Compiled files should be writable (default is read only).
-env <filename>
Read <filename> to define variable bindings for substitution during compilation.
-D ident value
Bind <ident> to <value> for substitution during compilation.
-lang <language>
The language is set to <language> during the compilation (default is to guess the language from the source file-name extension).
-default-lang <language>
The default language is set to <language>.
--languages
List the set of languages that htmlc currently supports.
-s <filename.shtml>
Set the input file to <filename.shtml>, the output file is set to <filename.html>.
-c <filename.html>
Set the input file to <filename.html>, the output file is set to <filename.htm>.
-tpl <filename>
Set the input file to <filename>, the output file is set to <file.html>, where <file> designates <filename> without its extension (if any).
-o <filename>
Set the output compiled file to <filename> ("-" stands for stdout).
-t <filename>
Set the output compiled file to <filename> ("-" stands for stdout).
-to <filename>
Set the output compiled file to <filename> ("-" stands for stdout).
-i <filename>
Set the input file to <filename> ("-" stands for stdin).
-f <filename>
Set the input file to <filename> ("-" stands for stdin).
-from <filename>
Set the input file to <filename> ("-" stands for stdin).
-v
Print the htmlc version number.
--version
Print the htmlc long version number.
-help
Display this list of options
--help
Display this list of options
This program is distributed under the artistic licence found in the LICENSE file in the root directory of the distribution.

SEE ALSO

The htmlc user's manual (http://caml.inria.fr/htmlc/eng.htm) (french version at http://caml.inria.fr/htmlc/fra.htm).

AUTHORS

Pierre Weis <Pierre.Weis@inria.fr>

The original version of this manual page was written by Pierre Weis <Pierre.Weis@inria.fr>, for htmlc version 1.6.

Institut National de Recherche en Informatique et en Automatique (2004)