Skip to main content

Wrapper for HTML Tidy at https://www.html-tidy.org/

Project description

Build Status Coverage Status Documentation

This is fork of uTidylib with permission with original author. Originally it incorporated patches from Debian and other distributions, now it also brings compatibility with recent html-tidy versions and works with Python 3.

The package is available on PyPI <https://pypi-hypernode.com/project/uTidylib/>.

This is uTidylib, the Python wrapper for the HTML cleaning library named TidyLib. It supports both original Tidy <http://tidy.sf.net> and new HTML5 enabled Tidy <http://www.html-tidy.org/>.

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

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

Then, of course, there’s the API documentation, which is available at <https://utidylib.readthedocs.io/en/latest/>.

10 Second Tutorial

>>> import tidy
>>> print(
...     tidy.parseString(
...         "<Html>Hello Tidy!",
...         output_xhtml=1,
...         add_xml_decl=1,
...         indent=1,
...         tidy_mark=0,
...         doctype="transitional",
...     )
... )
<?xml version="1.0"?>
<!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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uTidylib-0.7.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

uTidylib-0.7-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file uTidylib-0.7.tar.gz.

File metadata

  • Download URL: uTidylib-0.7.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for uTidylib-0.7.tar.gz
Algorithm Hash digest
SHA256 32fbcfffba5a56a478229c80f0dff42ac3c556a7315af6ffaa15880f0a184735
MD5 50227de78d96004fcd9f08dad75f887f
BLAKE2b-256 9dab2ba8ed8ca54bb25b87e9ef8e803da7428fdd93832b374e4d0402431d6fdc

See more details on using hashes here.

File details

Details for the file uTidylib-0.7-py3-none-any.whl.

File metadata

  • Download URL: uTidylib-0.7-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for uTidylib-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 71300c6783bb441b478e31c38e1c07279ca1293665e34317a035b302b6f2eeb3
MD5 c09ebb8019e2e77feef1aa38179c48bd
BLAKE2b-256 4d47d7e06333604bf052a5f55f8abd2d4727ae5294d35b11d640fea9c092f1dd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page