  

INTRODUCTION
HTB 2.0 is a free, command-line utility to reformat HTML/XML/XSLT source code with an array of user specified options. The output is clean, consistent, and easy-to-read tagged markup code.
The format for "htb" at the command line prompt is:
"htb -(options) [tagged filename] [new filename]"
Options:
a: Force break of all multi-attribute Tags with alignment on the 1st one (default for Tags going over 80 columns as whitespace permits).
b: Force break of every Tag Attribute onto a new line with alignment on the last character in the Tag.
c: Force extra Carriage Return character after each line (allows creation of DOS compatible file from Unix system).
d: Never add extra Carriage Return character after each line (default).
e: Escape Tag characters & create browser viewable source conversion (ie. "<" <", TO>" to ">", etc.).
f: Run as filter - read from standard input and write to standard output (any file names also specified are ignored).
h: Help screen. j: Join lines wherever possible and remove comments & extra whitespace. (overrides re-formatting options and compresses output).
k: Keep current layout, just apply upper/lower case (overrides non-case related options).
l: Make Tag names lower case.
m: Make Tag Attribute case the opposite of the Tag name.
n: Never break Tag Attributes onto separate lines.
r: Remove Non-HTML tags. HTML 4.01 and common legacy Tags remain (overrides x option).
s: Remove tabs from SCRIPTS and indent using blanks. Scripts could look worse, but the tabs are gone. By default scripts are not changed.
t: Strip all but plain text content from input. No tags or comments remain.
u: Make Tag names upper case (default).
x: Treat unknown tags as "well-formed" XML. Case changes & attribute sorting only applied to known HTML tags (default if XML detected).
y: Turn off XML detection (overrides x option, case changes go on all Tags).
z: Remove stand-alone comments (not within SCRIPT, STYLE, etc).
[0-9]: Use (number) of spaces for indenting (default = 3).
Options may be combined into one argument (-l -m -5 = -lm5). If an output file is not defined, reformatted data is sent to "standard out". The default behavior for "htb" is to make all tag and tag attributes upper case and use 3 spaces for indenting. Also, tags going over 80 columns will be broken by attribute name onto the succeeding lines.
|