Skip to main content

Wrapper for HTML Tidy

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.9.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

uTidylib-0.9-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: uTidylib-0.9.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for uTidylib-0.9.tar.gz
Algorithm Hash digest
SHA256 f505f0437bdb2fa66227ed0de57462898d817a6c1523383f29dc7bfc13203a21
MD5 41432df3109b8dae8864ab5786fc9bab
BLAKE2b-256 00860b4d2061b28f5e5c2c5213361f20709d1add4fdcda200ba08788f171137f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: uTidylib-0.9-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for uTidylib-0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 62ec331932b509045042039b73f04d9ef50b76f04c2d29a0e0ef39a73de5f9d0
MD5 b65f97b4f70ea0e077687a5759ba1f8b
BLAKE2b-256 9fb334454dea1d6373fb66dc3e3b1c65fee66270dcc4396cc2299b74b82898fe

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