Windows PowerShell command on Get-command tidy
MyWebUniversity

Manual Pages for UNIX Operating System command usage for man tidy

User commands tidy(1)

NAME

tidy - validate, correct, and pretty-print HTML files

SYNOPSIS

tidy [option ...] [file ...] [option ...] [file ...]

DESCRIPTION

Tidy reads HTML, XHTML and XML files and writes cleaned up markup. For HTML variants, it detects and corrects many common coding errors and strives to produce visually equivalent markup that is both W3C compliant and works on most browsers. A common use of Tidy is to convert plain HTML to XHTML. For generic XML files, Tidy is limited to

correcting basic well-formedness errors and pretty printing.

If no input file is specified, Tidy reads the standard input. If no output file is specified, Tidy writes the tidied markup to the standard output. If no error file is specified, Tidy writes messages to the standard error. For command line options that expect a numerical argument, a default is assumed if no meaningful value can be found. OPTIONS File manipulation

-output , -o

write output to the specified (output-file:

)

-config

set configuration options from the specified

-file , -f

write errors to the specified (error-file:

)

-modify, -m

modify the original input files (write-back: yes)

Processing directives

-indent, -i

indent element content (indent: auto)

-wrap , -w

wrap text at the specified . 0 is assumed if is missing. When this option is omitted, the default of the configuration option "wrap" applies. (wrap: )

-upper, -u

force tags to upper case (uppercase-tags: yes)

HTML Tidy 1.0.0 Last change: 1 Feb 2007 1

User commands tidy(1)

-clean, -c

replace FONT, NOBR and CENTER tags by CSS (clean: yes)

-bare, -b

strip out smart quotes and em dashes, etc. (bare: yes)

-numeric, -n

output numeric rather than named entities (numeric-

entities: yes)

-errors, -e

only show errors (markup: no)

-quiet, -q

suppress nonessential output (quiet: yes)

-omit

omit optional end tags (hide-endtags: yes)

-xml specify the input is well formed XML (input-xml: yes)

-asxml, -asxhtml

convert HTML to well formed XHTML (output-xhtml: yes)

-ashtml

force XHTML to well formed HTML (output-html: yes)

-access

do additional accessibility checks ( = 0, 1, 2, 3). 0 is assumed if is missing.

(accessibility-check: )

Character encodings

-raw output values above 127 without conversion to entities

-ascii

use ISO-8859-1 for input, US-ASCII for output

-latin0

use ISO-8859-15 for input, US-ASCII for output

-latin1

use ISO-8859-1 for both input and output

-iso2022

use ISO-2022 for both input and output

HTML Tidy 1.0.0 Last change: 1 Feb 2007 2

User commands tidy(1)

-utf8

use UTF-8 for both input and output

-mac use MacRoman for input, US-ASCII for output

-win1252

use Windows-1252 for input, US-ASCII for output

-ibm858

use IBM-858 (CP850+Euro) for input, US-ASCII for output

-utf16le

use UTF-16LE for both input and output

-utf16be

use UTF-16BE for both input and output

-utf16

use UTF-16 for both input and output

-big5

use Big5 for both input and output

-shiftjis

use Shift_JIS for both input and output

-language

set the two-letter language code (for future

use) (language: ) Miscellaneous

-version, -v

show the version of Tidy

-help, -h, -?

list the command line options

-xml-help

list the command line options in XML format HTML Tidy 1.0.0 Last change: 1 Feb 2007 3

User commands tidy(1)

-help-config

list all configuration options

-xml-config

list all configuration options in XML format

-show-config

list the current configuration settings

USAGE

Use --optionX valueX for the detailed configuration option

"optionX" with 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

For further info on HTML see http://www.w3.org/MarkUp. For more information about HTML Tidy, visit the project home

page at http://tidy.sourceforge.net. Here, you will find

links to documentation, mailing lists (with searchable archives) and links to report bugs. ENVIRONMENT

HTML_TIDY

Name of the default configuration file. This should be

an absolute path, since you will probably invoke tidy

from different directories. The value of HTML_TIDY

will be parsed after the compiled-in default (defined

with -DTIDY_CONFIG_FILE), but before any of the files

specified using -config.

EXIT STATUS 0 All input files were processed successfully. 1 There were warnings. 2 There were errors.

______________________________

DETAILED CONFIGURATION OPTIONS This section describes the Detailed (i.e., "expanded") Options, which may be specified by preceding each option HTML Tidy 1.0.0 Last change: 1 Feb 2007 4

User commands tidy(1)

with -- at the command line, followed by its desired value,

OR by placing the options and values in a configuration

file, and telling tidy to read that file with the -config

standard option.

SYNOPSIS

tidy --option1 value1 --option2 value2 [standard options

...]

tidy -config config-file [standard options ...]

WARNING The options detailed here do not include the "standard"

command-line options (i.e., those preceded by a single '-')

described above in the first section of this man page.

DESCRIPTION

A list of options for configuring the behavior of Tidy, which can be passed either on the command line, or specified in a configuration file. A Tidy configuration file is simply a text file, where each option is listed on a separate line in the form option1: value1 option2: value2 etc. The permissible values for a given option depend on the option's Type. There are five types: Boolean, AutoBool, DocType, Enum, and String. Boolean types allow any of yes/no, y/n, true/false, t/f, 1/0. AutoBools allow auto in addition to the values allowed by Booleans. Integer types

take non-negative integers. String types generally have no

defaults, and you should provide them in non-quoted form

(unless you wish the output to contain the literal quotes). Enum, Encoding, and DocType "types" have a fixed repertoire of items; consult the Example[s] provided below for the option[s] in question. You only need to provide options and values for those whose defaults you wish to override, although you may wish to

include some already-defaulted options and values for the

sake of documentation and explicitness. Here is a sample config file, with at least one example of each of the five Types: // sample Tidy configuration options

output-xhtml: yes

add-xml-decl: no

doctype: strict HTML Tidy 1.0.0 Last change: 1 Feb 2007 5

User commands tidy(1)

char-encoding: ascii

indent: auto wrap: 76

repeated-attributes: keep-last

error-file: errs.txt

Below is a summary and brief description of each of the options. They are listed alphabetically within each category. There are five categories: HTML, XHTML, XML

options, Diagnostics options, Pretty Print options, Charac-

ter Encoding options, and Miscellaneous options. OPTIONS HTML, XHTML, XML options:

add-xml-decl

Type: Boolean Default: no Example: y/n, yes/no, t/f, true/false, 1/0 This option specifies if Tidy should add the XML declaration when outputting XML or XHTML. Note that if the input already includes an declaration then this option will be ignored. If the encoding for the output is different from "ascii", one of the utf encodings or "raw", the declaration is always added as required by the XML standard.

See also: char-encoding, output-encoding

add-xml-space

Type: Boolean Default: no Example: y/n, yes/no, t/f, true/false, 1/0 This option specifies if Tidy should add xml:space="preserve" to elements such as
,