1
<!-- manual page source format generated by PolyglotMan v3.2, -->
2
<!-- available at http://polyglotman.sourceforge.net/ -->
6
<title>HINDENT(1) manual page</title>
9
<a href='#toc'>Table of Contents</a><p>
11
<h2><a name='sect0' href='#toc0'>Name</a></h2>
12
hindent - HTML reformatting/nesting utility
13
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
14
<b>hindent</b> [-fslcv]
15
[-i <i>num</i>] [-t <i>num</i>] [file ...]
16
<h2><a name='sect2' href='#toc2'>Description</a></h2>
17
This utility takes one or more HTML
18
files and reformats them by properly indenting them for greater human readability.
19
The new HTML code is written to standard output, any errors go to standard
20
error. If no file is specified, <b>hindent</b> reads from standard input. If more
21
than one file is specified, each is taken in turn and all output is concatenated
22
(with no way to distinguish when one output ends and the next begins). <p>
24
any options, <b>hindent</b> simply varies the amount of whitespace at the beginning
25
of each line of input - no lines are added or subtracted from the HTML code.
26
This means that it generates output that should draw the same on all browsers
27
as the input HTML. If the <b>-s</b> or <b>-f</b> options are used, the resulting HTML may
28
not draw exactly the same any more. It is important that you keep your
29
original HTML data around, just in case! <p>
30
This version of <b>hindent</b> understands
31
all container tags defined in the HTML 3.2 standard.
32
<h2><a name='sect3' href='#toc3'>Options</a></h2>
38
all tags to lowercase. By default, <b>hindent</b> forces all tags to uppercase.
42
<dd>Flow. Prints just tags without any data between the tags. Damages the
43
HTML in a big way, so save a copy of your original HTML. This option helps
44
you follow the HTML code flow visually. </dd>
46
<dt><b>-i <i>num</i></b> </dt>
47
<dd>Indent level. Set indentation
48
to this many character spaces per code nesting level. If set to 0, no indentation
49
is done (all output is left-justified). </dd>
52
<dd>List tags. Causes <b>hindent</b> to print
53
a complete list of tags that it recognizes to stdout, and exits. </dd>
57
Multiple tags per line are broken out onto separate lines. Can damage the
58
HTML in minor ways by drawing an extra space character in certain parts
59
of the web page, so save a copy of your original HTML. This option helps
60
you follow the HTML code flow visually, especially with computer-generated
61
HTML that comes out all on one line. </dd>
63
<dt><b>-t <i>num</i></b> </dt>
64
<dd>Tab stop. Set the number of spaces
65
that a tab character occupies on your system. Defaults to 8, but some people
66
prefer expanding tabs to 4 spaces instead. If set to 0, no tabs are output
67
(spaces used to indent lines). </dd>
70
<dd>Version. Prints <b>hindent</b>’s version number
71
to stdout and exits immediately. </dd>
74
The <b>-s</b> option is the most useful, it would
75
be the default if it didn’t damage the HTML code. <p>
76
Any combination of these
79
<h2><a name='sect4' href='#toc4'>Examples</a></h2>
81
Example 1. Download a web page, reformat it,
88
<dt>CRlynx -source <a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'>http://www.domtools.com/~pab</a>
98
| hindent | moreExample 2. View
99
only the structure, one tag per line: </dt>
108
<dt>CRlynx -source <a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'><a href='http://www.domtools.com/~pab'>http://www.domtools.com/~pab</a>
118
| hindent -s -f | moreExample 3. Reformat
119
my home page non-damagingly with 4-space tabs, keeping a backup copy: </dt>
127
<h2><a name='sect5' href='#toc5'>CRcd $HOME/public_htmlmv index.html index.html.oldhindent -i4 index.html.old
128
> index.htmlSite</a></h2>
129
The master web page for this tool is:
132
<dt><a href='http://www.domtools.com/unix/hindent.shtml'>http://www.domtools.com/unix/hindent.shtml</a>
138
<h2><a name='sect6' href='#toc6'>Version</a></h2>
139
<b>Hindent</b> version 1.1.2
140
<h2><a name='sect7' href='#toc7'>Author</a></h2>
141
Paul Balyoz <pab@domtools.com> <p>
144
<a name='toc'><b>Table of Contents</b></a><p>
146
<li><a name='toc0' href='#sect0'>Name</a></li>
147
<li><a name='toc1' href='#sect1'>Synopsis</a></li>
148
<li><a name='toc2' href='#sect2'>Description</a></li>
149
<li><a name='toc3' href='#sect3'>Options</a></li>
150
<li><a name='toc4' href='#sect4'>Examples</a></li>
151
<li><a name='toc5' href='#sect5'>CRcd $HOME/public_htmlmv index.html index.html.oldhindent -i4 index.html.old > index.htmlSite</a></li>
152
<li><a name='toc6' href='#sect6'>Version</a></li>
153
<li><a name='toc7' href='#sect7'>Author</a></li>