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

Re: Any table "summary" attribute tool?

From: Charles Reitzel <creitzel@rcn.com>
Date: Fri, 09 Aug 2002 11:56:51 -0400
Message-Id: <4.3.2.7.2.20020809115203.02a819b0@pop.rcn.com>
To: jany.quintard@bigfoot.com
Cc: michaelhyleung@hsbc.com.hk, html-tidy@w3.org

I might add that, if you are going to use sed, awk or some regex-type text 
replacement on HTML files, do it on Tidy output.  The pattern matching will 
work much more reliably on a consistent layout.  If you like, Tidy it again 
afterwards, but it shouldn't be necessary.

I have used sed in just this way to assign stylesheets.  Out of a few 
hundred files, I only had to fix two or three by hand.

And, yes, do all your sed mangling on a _copy_.

take it easy,
Charlie

At 09:47 AM 8/9/2002 +0200, Jany Quintard wrote:

>* michaelhyleung@hsbc.com.hk [Wed, 07/08/2002 at 02:33 -0400]
> > Hello,
> >
> > If I?m managing a large volume of HTML pages, is there
> > any tools that I can use to satisfy the table
> > ?summary? attribute requirements without going to
> > each page and modify it manually?
> >
> > PS.  Am I overlooking or I don?t see any options
> > for me to add the ?summary? attribute under the
> > configuration file setting(HTML tidy) ?
>
>## CAUTION: NOT TESTED
>for file $(find . -name "*.html)
>do
>   cat $file | sed s!<table!&\ summary="Automatically_added"!g > \
>   /tmp/add.html
>
>   cat /tmp/add.html > $file
>done
>
>This should do the trick (UNTESTED!!!!), if you have a Unix box.
>I am not sure that the spaces in the sed command work. See the man. Save 
>your files before trying, in case I goofed, or try it on a copy !!!
>
>Jany
Received on Friday, 9 August 2002 11:49:40 GMT

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