W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2000

Re: Error from Tidy

From: Norbert Bottlaender-Prier <norbert@globenet.org>
Date: Mon, 23 Oct 2000 21:53:59 +0200
Message-ID: <39F49757.A436CF8@globenet.org>
To: "'html-tidy@w3.org'" <html-tidy@w3.org>
Bischoff, Alex wrote:
> 
> > I also want to change the default settings for Tidy. Could someone
> > explain in *very simple terms* how I set the environmental variable
> > HTML_TIDY in Windows 98 please. What exactly do I need to type and in
> > which file?
>... 

Hi folks,

As (nearly) always in programming, there are different ways to get to
the same result...

> 
> 1. Using Notepad.exe, open "autoexec.bat" in your root directory. For

But I don't think that hacking the system startup files is an excellent
idea.

On my behalf, I'd prefer creating "ad hoc" "bat" files, as I did before
getting rid if the Micro$oft systems. You don't need to reboot the
system, and you simply declare the HTML_TIDY variable at the very moment
you need it, then "undeclare it" just afterwards.

So your "personalized_tidy.bat" file may look like this :

SET HTML_TIDY="this_is_your_html_tidy_value"
rem declare the html_tidy variable
your_tidy_path\tidy.exe %1 -your_tidy_command_line_options
rem run tidy with the html_tidy variable set by invoking:
rem "personalized_tidy.bat yourpath\yourfile.htm"
SET HTML_TIDY=""
rem unset the html_tidy variable

So, you can open an MSDOS window, execute the .BAT file and "that's all
folks" ;-)
By the way, you can create lots of different .bat files as you see fit,
e.g. a "tidy_to_html_4_but_not_clean.bat" file, a "tidy_xml_output.bat"
file, or a "tidy_no_warnings.bat" file etc.... as many as you need...

I think this method will work on all M$Windows releases.

The only problem to be aware of is that your .BAT files and the TIDY.EXE
program MUST NOT have the same name, if they reside in the same
directory. If you have a directory which contains "tidy.exe" *AND*
"tidy.bat" , invoking "tidy" will execute the "tidy.exe" file (i.e. all
options set to "default"), *NOT* the "tidy.bat" file.

Have a nice day

Norbert

-- 
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
  (o_    This was The Megabyte Text Magician - http://tmtm.free.fr
  //\               "Les peripheriques vous parlent"
  V_/_    http://www.globenet.org/periph    -    TUX powered  ;-)
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
Received on Monday, 23 October 2000 16:08:10 GMT

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