HTML Tidy-051026

Introduction to HTML Tidy

The HTML Tidy package contains a command line tool and libraries used to read HTML, XHTML and XML files and write cleaned up markup. It detects and corrects many common coding errors and strives to produce visually equivalent markup that is both W3C compliant and compatible with most browsers.

Package Information

Additional Downloads

Documentation

Patches

HTML Tidy Dependencies

Recommended (To Build the Man Page and Quick Reference Docs)

Optional

Dmalloc

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/tidy

Installation of HTML Tidy

The HTML Tidy documentation is contained in a separate tarball. Unpack both the source and docs tarballs before starting the build.

Install HTML Tidy by running the following commands:

patch -Np1 -i ../tidy-051026-prevent_PRE_newlines-1.patch &&
sh build/gnuauto/setup.sh &&
./configure --prefix=/usr &&
make

This package does not come with a test suite.

Now, as the root user:

make install

If you have libxslt-1.1.17 installed, issue the following commands as an unprivileged user to build the man page and HTML documentation:

cd htmldoc &&
tidy -xml-help > tidy-help.xml &&
tidy -xml-config > tidy-config.xml &&
xsltproc -o tidy.1 tidy1.xsl tidy-help.xml &&
xsltproc -o quickref.html quickref-html.xsl tidy-config.xml &&
cd ..

If you built the man page and the Quick Reference HTML file, install the man page by issuing the following command as the root user:

install -v -m644 htmldoc/tidy.1 /usr/share/man/man1

Now finish the installation by installing the pre-built documentation as the root user:

install -v -m755 -d /usr/share/doc/tidy-051020 &&
cp -v -R htmldoc/* /usr/share/doc/tidy-051020

Command Explanations

sh build/gnuauto/setup.sh: This command prepares the source tree for building using the GNU “Auto” tools.

Configuring HTML Tidy

Config Files

The absolute path of the file specified in $HTML_TIDY.

Configuration Information

The default configuration options can be set in the file defined in $HTML_TIDY. Additional configuration options can be passed to tidy via command line parameters or the -config <file> parameter.

Contents

Installed Programs: tab2space and tidy
Installed Library: libtidy.{so,a}
Installed Directory: /usr/share/doc/tidy-051020

Short Descriptions

tab2space

is a utility to expand tabs and ensure consistent line endings.

tidy

validates, corrects, and pretty-prints HTML files.

libtidy.{so,a}

libraries provide the HTML Tidy API functions to tidy and can also be called by other programs.

Last updated on 2007-02-01 12:14:21 -0600