OSDN Git Service

設定変更。
[wordring-tm/wordring-tm.git] / third_party / tidy-html5-master / build / documentation / pages / page_tidy_quickstart.dox
1 /*!
2
3 \page tidy_quickstart tidy command quickstart
4
5 \tableofcontents
6
7 This is the syntax for invoking Tidy from the command line:
8 \code{.sh}
9 tidy [[options] filename]
10 \endcode
11
12 Tidy defaults to reading from standard input, so if you run Tidy without specifying the filename argument, it will just sit there waiting for input to read.
13
14 Tidy defaults to writing to standard output. So you can pipe output from Tidy to other programs, as well as pipe output from other programs to Tidy. You can page through the output from Tidy by piping it to a pager, e.g.:
15 \code{.sh}
16 tidy file.html | less
17 \endcode
18
19 \section out_file Output to file
20
21 To have Tidy write its output to a file instead, either use the
22 \code{.sh}
23 -o filename 
24 or 
25 -output filename
26 \endcode
27 option, or redirect standard output to the file. For example:
28 \code{.sh}
29 tidy -o output.html index.html
30 tidy -output output.html index.html
31 tidy index.html > output.html
32 \endcode
33
34 All the above run Tidy on the file `index.html` and write the output to the file `output.html`, while writing any error messages to standard error.
35
36 \section out_error Error output
37
38 Tidy defaults to writing its error messages to standard error (that is, to the console where you’re running Tidy). To page through the error messages along with the 
39 output, redirect standard error to standard output, and pipe it to your pager:
40 \code{.sh}
41 tidy index.html 2>&1 | less
42 \endcode
43 To have Tidy write the errors to a file instead, either use 
44 \code{.sh}
45 -f filename 
46 or 
47 -file filename
48 \endcode
49 option, or redirect standard error to a file:
50 \code{.sh}
51 tidy -o output.html -f errs.txt index.html
52 tidy index.html > output.html 2> errs.txt
53 \endcode
54
55 Both the above run Tidy on the file `index.html` and writes the output to the file `output.html`, while writing any error messages to the `file errs.txt`.
56
57 Writing the error messages to a file is especially useful if the file you are checking has many errors; reading them from a file instead of the console 
58 or pager can make it easier to review them.
59
60 \section out_modify Modify / Overwrite
61 You can use the or `-m` or `-modify` option to modify (in-place) the contents of the input file you are checking; that is, to overwrite those contents with the output from Tidy. For example:
62
63 \code{.sh}
64 tidy -f errs.txt -m index.html
65 \endcode
66 That runs Tidy on the file `index.html`, modifying it in place and writing the error messages to the file `errs.txt`.
67
68 \warning If you use the `-m` option, you should first ensure that you have a backup copy of your file.
69
70
71 */