tr_staticssi -- expand SSI directives #include virtual and #exec cmd |
tr_staticssi -- expand SSI directives #include virtual and #exec cmd
tr_staticssi[-h] [-d doc-root-directory] file.shtml
tr_staticssi reads a file below doc-root-directory and expands SSI directives (#include virtual and #exec cmd). Nested directives up to level 3 are supported. The expanded document is printed to stdout.
This program sets the environment variables DOCUMENT_URI, REQUEST_URI, DOCUMENT_NAME. DOCUMENT_URI and REQUEST_URI are set to the filename provided on the command line. If you have also #exec cmd statements in the code that depend on these variables the you must use the doc-root-directory as current working directory.
The SSI must look like this:
<!--#include virtual=``filename'' -->
<!--#exec cmd=``command'' -->
The program is useful if you want to generate static html pages from dynamic html.
-h short help
-d the path to webserver document root directory
cd /home/httpd/html
tr_staticssi -d /home/httpd/html somedir/index.shtml > somedir/expand.html
This will expand include and exec directives in index.shtml.
tr_staticssi is part of the HTML::TagReader package and was written by Guido Socher [guido(at)linuxfocus.org]
tr_staticssi -- expand SSI directives #include virtual and #exec cmd |