tidy-html5-5.8.0

#### Beyond Linux® From Scratch (systemd Edition) - Version r13.0-553

### Chapter 11. General Utilities

- Prev

  Sharutils-4.15.2

- Next

  Time-1.9

- Up
- Home

# tidy-html5-5.8.0

## Introduction to Tidy HTML5

The Tidy HTML5 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.

### Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

### Package Information

- Download (HTTP): https://github.com/htacg/tidy-html5/archive/5.8.0/tidy-html5-5.8.0.tar.gz

- Download MD5 sum: 0f6c55ef651e258adbe5750f555af50f

- Download size: 992 KB

- Estimated disk space required: 11 MB

- Estimated build time: 0.2 SBU

### Additional Downloads

- Required patch: https://www.linuxfromscratch.org/patches/blfs/svn/tidy-html5-5.8.0-cmake4_fixes-1.patch

### Tidy HTML5 Dependencies

#### Required

CMake-4.3.2

#### Recommended

libxslt-1.1.45

## Installation of Tidy HTML5

First, fix a build failure that occurs when using CMake 4.0 and later:

    patch -Np1 -i ../tidy-html5-5.8.0-cmake4_fixes-1.patch

Install Tidy HTML5 by running the following commands:

    cd build/cmake &&

    cmake -D CMAKE_INSTALL_PREFIX=/usr \
          -D CMAKE_BUILD_TYPE=Release  \
          -D BUILD_TAB2SPACE=ON        \
          ../..    &&

    make

This package does not come with a test suite.

Now, as the `root` user:

    make install &&
    rm -fv /usr/lib/libtidy.a &&
    install -v -m755 tab2space /usr/bin

## Command Explanations

`-D CMAKE_BUILD_TYPE=Release`: This switch is used to build the release library without any debug `assert` in the code.

`-D BUILD_TAB2SPACE=ON`: This switch is used to enable building the tab2space utility.

## Configuring Tidy HTML5

### 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
Installed Directory: /usr/share/doc/tidy-5.8.0

### Short Descriptions

tab2space | is a utility to expand tabs and ensure consistent line endings
tidy | validates, corrects, and pretty-prints HTML files
`libtidy.so` | library provides the Tidy HTML5 API functions to tidy and can also be called by other programs

- Prev

  Sharutils-4.15.2

- Next

  Time-1.9

- Up
- Home