$Id: cmpp.txt,v 1.1 1999/08/14 16:16:15 cm Exp $ cm's HTML preprocessor. most others are too kinky and complicated. this one is targeted at simple preprocessing (include, variable substitution) and making TOCs with references to docs where the docs get preprocessed, and the TOC entry gets made by a template substituting variables from the referenced file. stuff is included in <<...>> the parser does \-style line continuation, i.e. s/\s*\\\n//g; variable definitions: <> -- everything is a string, varname =~ /^[\w\d_]+$/ <> -- insert value of variable; variable is expanded (i.e. passed thru the engine) magic vars: body -- the non-<<...>>ed-stuff from a .ref'd file goes into "body" infile -- name of the current input file outfile -- name of the current output file. it's $infile = s/\.[^\.]+$/.html/ reflink -- name of the file referenced by <<.ref ...>> (disregarding -o) toctmpl -- template for TOC entry for .ref doctmpl -- template for generated file for .ref lastmod -- last modification date of infile date -- now <<.command>> -- commands, which are: <<.include filename>> <<.ref filename>> -- makes above mentioned TOC entry + processes filename. <<.condlink filename text>> -- output text if filename != outfile, text otherwise (for navbars). <<.comm text>> -- comment. <<.ifvar varname block>> -- output block if var is not empty invocation: cmpp.pl [options] file ... options: see $usage in cmpp.pl $Log: cmpp.txt,v $ Revision 1.1 1999/08/14 16:16:15 cm Initial revision Revision 1.2 1999/04/24 22:25:57 cm *** empty log message *** Revision 1.1 1999/04/24 21:09:15 cm Initial revision