W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2001

Re: Adding options to config.txt

From: Richard A. O'Keefe <ok@atlas.otago.ac.nz>
Date: Mon, 27 Aug 2001 13:51:17 +1200 (NZST)
Message-Id: <200108270151.NAA157672@atlas.otago.ac.nz>
To: Xavier.Decoret@imag.fr, html-tidy@w3.org, terry_teague@users.sourceforge.net
Use HTML Tidy as a component.
Write a little script, in AWK, Perl, Python, or even sh, or whatever takes
your fancy, that turns
<!--exec cmd="Header.pl" -->
into
<!DOCTYPE html ...whichever version you want...>
<HTML><HEAD><TITLE>Header.pl</TITLE></HEAD><BODY>

and
<!--exec cmd="Footer.pl" -->
into
</BODY></HTML>

The script should then run HTML Tidy,
then take the output, and replace everything up to and including <BODY>
with <!--exec cmd="Header.pl" --> and everything from and including
</BODY> to the end of the file with <!--exec cmd="Footer.pl -->.

From the use of the .pl extension (which Larry Wall very rudely stole
from Prolog, which had been using it for a long time before Perl was
nightmared of) I surmise that Perl is being used, and it should be quite
easy to whip up a script like this in just a few lines of Perl.
Received on Sunday, 26 August 2001 21:51:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:46 GMT