You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
157 lines
5.5 KiB
157 lines
5.5 KiB
2 years ago
|
<!-- manual page source format generated by PolyglotMan v3.2, -->
|
||
|
<!-- available at http://polyglotman.sourceforge.net/ -->
|
||
|
|
||
|
<html>
|
||
|
<head>
|
||
|
<title>HINDENT(1) manual page</title>
|
||
|
</head>
|
||
|
<body bgcolor='white'>
|
||
|
<a href='#toc'>Table of Contents</a><p>
|
||
|
|
||
|
<h2><a name='sect0' href='#toc0'>Name</a></h2>
|
||
|
hindent - HTML reformatting/nesting utility
|
||
|
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
|
||
|
<b>hindent</b> [-fslcv]
|
||
|
[-i <i>num</i>] [-t <i>num</i>] [file ...]
|
||
|
<h2><a name='sect2' href='#toc2'>Description</a></h2>
|
||
|
This utility takes one or more HTML
|
||
|
files and reformats them by properly indenting them for greater human readability.
|
||
|
The new HTML code is written to standard output, any errors go to standard
|
||
|
error. If no file is specified, <b>hindent</b> reads from standard input. If more
|
||
|
than one file is specified, each is taken in turn and all output is concatenated
|
||
|
(with no way to distinguish when one output ends and the next begins). <p>
|
||
|
Without
|
||
|
any options, <b>hindent</b> simply varies the amount of whitespace at the beginning
|
||
|
of each line of input - no lines are added or subtracted from the HTML code.
|
||
|
This means that it generates output that should draw the same on all browsers
|
||
|
as the input HTML. If the <b>-s</b> or <b>-f</b> options are used, the resulting HTML may
|
||
|
not draw exactly the same any more. It is important that you keep your
|
||
|
original HTML data around, just in case! <p>
|
||
|
This version of <b>hindent</b> understands
|
||
|
all container tags defined in the HTML 3.2 standard.
|
||
|
<h2><a name='sect3' href='#toc3'>Options</a></h2>
|
||
|
|
||
|
<dl>
|
||
|
|
||
|
<dt><b>-c</b> </dt>
|
||
|
<dd>Case. Forces
|
||
|
all tags to lowercase. By default, <b>hindent</b> forces all tags to uppercase.
|
||
|
</dd>
|
||
|
|
||
|
<dt><b>-f</b> </dt>
|
||
|
<dd>Flow. Prints just tags without any data between the tags. Damages the
|
||
|
HTML in a big way, so save a copy of your original HTML. This option helps
|
||
|
you follow the HTML code flow visually. </dd>
|
||
|
|
||
|
<dt><b>-i <i>num</i></b> </dt>
|
||
|
<dd>Indent level. Set indentation
|
||
|
to this many character spaces per code nesting level. If set to 0, no indentation
|
||
|
is done (all output is left-justified). </dd>
|
||
|
|
||
|
<dt><b>-l</b> </dt>
|
||
|
<dd>List tags. Causes <b>hindent</b> to print
|
||
|
a complete list of tags that it recognizes to stdout, and exits. </dd>
|
||
|
|
||
|
<dt><b>-s</b> </dt>
|
||
|
<dd>Strict.
|
||
|
Multiple tags per line are broken out onto separate lines. Can damage the
|
||
|
HTML in minor ways by drawing an extra space character in certain parts
|
||
|
of the web page, so save a copy of your original HTML. This option helps
|
||
|
you follow the HTML code flow visually, especially with computer-generated
|
||
|
HTML that comes out all on one line. </dd>
|
||
|
|
||
|
<dt><b>-t <i>num</i></b> </dt>
|
||
|
<dd>Tab stop. Set the number of spaces
|
||
|
that a tab character occupies on your system. Defaults to 8, but some people
|
||
|
prefer expanding tabs to 4 spaces instead. If set to 0, no tabs are output
|
||
|
(spaces used to indent lines). </dd>
|
||
|
|
||
|
<dt><b>-v</b> </dt>
|
||
|
<dd>Version. Prints <b>hindent</b>’s version number
|
||
|
to stdout and exits immediately. </dd>
|
||
|
</dl>
|
||
|
<p>
|
||
|
The <b>-s</b> option is the most useful, it would
|
||
|
be the default if it didn’t damage the HTML code. <p>
|
||
|
Any combination of these
|
||
|
options may be used.
|
||
|
<p>
|
||
|
<h2><a name='sect4' href='#toc4'>Examples</a></h2>
|
||
|
<p>
|
||
|
Example 1. Download a web page, reformat it,
|
||
|
view it: <br>
|
||
|
<pre>
|
||
|
</pre><p>
|
||
|
|
||
|
<dl>
|
||
|
|
||
|
<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>
|
||
|
</a>
|
||
|
</a>
|
||
|
</a>
|
||
|
</a>
|
||
|
</a>
|
||
|
</a>
|
||
|
</a>
|
||
|
</a>
|
||
|
</a>
|
||
|
| hindent | moreExample 2. View
|
||
|
only the structure, one tag per line: </dt>
|
||
|
<dd><br>
|
||
|
<pre>
|
||
|
</pre></dd>
|
||
|
</dl>
|
||
|
<p>
|
||
|
|
||
|
<dl>
|
||
|
|
||
|
<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>
|
||
|
</a>
|
||
|
</a>
|
||
|
</a>
|
||
|
</a>
|
||
|
</a>
|
||
|
</a>
|
||
|
</a>
|
||
|
</a>
|
||
|
</a>
|
||
|
| hindent -s -f | moreExample 3. Reformat
|
||
|
my home page non-damagingly with 4-space tabs, keeping a backup copy: </dt>
|
||
|
<dd><br>
|
||
|
<pre>
|
||
|
|
||
|
|
||
|
</pre></dd>
|
||
|
</dl>
|
||
|
|
||
|
<h2><a name='sect5' href='#toc5'>CRcd $HOME/public_htmlmv index.html index.html.oldhindent -i4 index.html.old
|
||
|
> index.htmlSite</a></h2>
|
||
|
The master web page for this tool is:
|
||
|
<dl>
|
||
|
|
||
|
<dt><a href='http://www.domtools.com/unix/hindent.shtml'>http://www.domtools.com/unix/hindent.shtml</a>
|
||
|
|
||
|
</dt>
|
||
|
<dd></dd>
|
||
|
</dl>
|
||
|
|
||
|
<h2><a name='sect6' href='#toc6'>Version</a></h2>
|
||
|
<b>Hindent</b> version 1.1.2
|
||
|
<h2><a name='sect7' href='#toc7'>Author</a></h2>
|
||
|
Paul Balyoz <pab@domtools.com> <p>
|
||
|
|
||
|
<hr><p>
|
||
|
<a name='toc'><b>Table of Contents</b></a><p>
|
||
|
<ul>
|
||
|
<li><a name='toc0' href='#sect0'>Name</a></li>
|
||
|
<li><a name='toc1' href='#sect1'>Synopsis</a></li>
|
||
|
<li><a name='toc2' href='#sect2'>Description</a></li>
|
||
|
<li><a name='toc3' href='#sect3'>Options</a></li>
|
||
|
<li><a name='toc4' href='#sect4'>Examples</a></li>
|
||
|
<li><a name='toc5' href='#sect5'>CRcd $HOME/public_htmlmv index.html index.html.oldhindent -i4 index.html.old > index.htmlSite</a></li>
|
||
|
<li><a name='toc6' href='#sect6'>Version</a></li>
|
||
|
<li><a name='toc7' href='#sect7'>Author</a></li>
|
||
|
</ul>
|
||
|
</body>
|
||
|
</html>
|