Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
HTML Tidy Python Library
branch: master

This branch is 112 commits ahead of xdissent:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
docs
tidy
.gitignore
.landscape.yaml
.travis.yml
INSTALL.txt
LICENSE
MANIFEST.in
README.md
pytest.ini
requirements-test.txt
requirements.txt
setup.cfg
setup.py

README.md

uTidyLib

Build Status Coverage Status Code Health Documentation

NOTE: This repository contains a patched version of uTidyLib which includes all Debian patches and works with Mac OS X.

This is uTidylib, the Python wrapper for the HTML cleaning library named TidyLib: http://tidy.sf.net .

Once installed, there are two ways to get help. The simplest is:

$ python
>>> import tidy
>>> help(tidy)
. . .

Then, of course, there's the epydoc-generated API documentation, which is available at site-packages/tidy/apidoc/index.html .

10 Second Tutorial

>>> import tidy
>>> print tidy.parseString(
...     '<Html>Hello Tidy!',
...     output_xhtml=1, add_xml_decl=1, indent=1, tidy_mark=0
... )
<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title></title>
  </head>
  <body>
    Hello Tidy!
  </body>
</html>

Good luck!

Something went wrong with that request. Please try again.