Tidy: Quick Reference

Configure [HTML] Tidy Processing: from the Man Pages

The following is an abbriged version of the Man Pages2 directly referenced of my own Fedora Core 5 Distribution, concerning the use of Tidy. Much of the total content has been “snipped” away, though most of what is reproduced below has not been modified from its original form (i.e. no extra words have been added, and the individual sentences have not been modified). The best reference for Tidy can be found at author David Raggett’s own web space off of the W3C’s web site. The software is available at tidy.sourceforge.net

USAGE
  • Use –optionX valueX for the any detailed configuration option “optionX” with the argument “valueX”. See also below under Detailed

  • Configuration Options as to how to conveniently group all such options in a single config file.
  • Input/Output default to stdin/stdout respectively. Single letter options apart from -f and -o may be combined as in:
              tidy -f errs.txt -imu foo.html

## NOTE END OF MAN PAGES ##
## BEGIN TIDY DISTRO HTML-DOC-FC5 — DAVE RAGGETT ##

To get a list of available options use:
   tidy -help

You may want to run it through more to view the help a page at a time.

   tidy -help | more
INPUT and OUTPUT

Input and Output default to stdin/stdout respectively. Single letter options apart from -f may be combined as in: tidy -f errs.txt -imu foo.html

Matej Vela <vela@debian.org> has written a Unix man page for Tidy, but for the latest details on config options and for the release notes please visit this page: http://www.w3.org/People/Raggett/tidy.

Using a Configuration File

Tidy now supports a configuration file, and this is now much the most convenient way to configure Tidy. Assuming you have created a config file named “config.txt” (the name doesn’t matter), you can instruct Tidy to use it via the command line option -config config.txt, e.g.

 tidy -config config.txt file1.html file2.html

Alternatively, you can name the default config file via the environment variable named “HTML_TIDY”. Note this should be the absolute path since you are likely to want to run Tidy in different directories. You can also set a config file at compile time by defining CONFIG_FILE as the path string, see platform.h.

You can now set config options on the command line by preceding the name of the option immediately (no intervening space) by “–”, for example:

  tidy --break-before-br true --show-warnings false

This resource to be updated as i experiment more with CLI Tidy.

Clean up your Web pages with HTML TIDY. Dave Raggett. Copyright © 1994-2003 W3C® Available at http://www.w3.org/People/Raggett/tidy/
2the Man Pages: the Linux Documentation Project. October 2004. Available at http://en.tldp.org/docs.html#man . Accessed 03.13.2007

BACK TO TOP [ javascript enabled ]