W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2000

Appending the error file?

From: Pete Gelbman <pete@arraycomm.com>
Date: Fri, 21 Apr 2000 16:39:19 -0400 (EDT)
Message-Id: <200004212033.EAA09248@isaiah.arraycomm.com>
To: html-tidy@w3.org

Recently started using Tidy and it's great! Many thanks to Dave and the others!

I have some minor suggestions for improved functionality:

1. Add option to create auto-backups of the original input file, if using the 
write-back option.

2. Add option to *append* the error file rather than overwrite it when using 
the error-file option. The file should be time-stamped and delimited on each 

3. Direct error/warning output to *both* STDOUT (terminal) as well as the 
error-file, when using the error-file option.

I use the following function to invoke Tidy with above add-on features. 
Perhaps someone else will find it useful. It's written as Bash shell function 
under Linux, but the simple concept could be re-written as a perl/csh/bat or 
whatever script for your particular system...

function fix {	# $1 is the 1st arg
    cp $1 ~/.tidy_backups/$1.bak; 
    echo  -------------------------------- >> ~/.logs/tidy_errors;
    date >> ~/.logs/tidy_errors;
    tidy -m $1 2>>~/.logs/tidy_errors;
    less -iM +G ~/.logs/tidy_errors; 


Received on Friday, 21 April 2000 16:40:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:47 UTC