This program is a filter for HTML documents including SSI of Apache or other web servers. It reads an HTML document including SSIs, recognizes and processes them, and outputs an HTML document. Even though it does not understand all of the elements of SSI, but it seems to work well for me :-)
Supported elements are as follows;
config
<!--#config sizefmt="..." -->
<!--#config timefmt="..." -->
fsize
<!--#fsize file="..." -->
flastmod
<!--#flastmod file="..." -->
include
<!--#include file="..." -->
echo
<!--#echo var="..." -->
set
<!--#set var="..." value="..." -->
LAST_MODIFIED
But, there are limitations as follows;
${foo}
like<!--#set var="Zed"
value="${REMOTE_HOST}_${REQUEST_METHOD}"
-->
$ ruby hf.rb < in.shtml > out.html $ ruby hf.rb --input-file in.shtml > out.html
The program reads data from a file specified with an option "--input-file" or from standard input.
Feel free to mail me
sato.mshr@gmail.comCopyright (C) 2000 Masahiro SATO