RE: Adding options to config.txt

What Richard said.  The only thing I would add is that you can use the
"body-only" option to reunite the Tidied output w/ the SSI header and
footer.

I still think a "--fragment" option would be useful to Tidy arbitrary
fragments of HTML.

take it easy,
Charlie

-----Original Message-----
From: Richard A. O'Keefe [mailto:ok@atlas.otago.ac.nz]
Sent: Sunday, August 26, 2001 9:51 PM
To: Xavier.Decoret@imag.fr; html-tidy@w3.org;
terry_teague@users.sourceforge.net
Subject: Re: Adding options to config.txt


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 Monday, 27 August 2001 12:20:52 UTC