Wrapper for HTML Tidy
Project description
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.org/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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uTidylib-0.8.tar.gz.
File metadata
- Download URL: uTidylib-0.8.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e23070d8270581ba1a334032f5712ac6a4de80109ffc48d62afe37657d8930c
|
|
| MD5 |
b25906e58bac501c21d0e105187aa658
|
|
| BLAKE2b-256 |
1d4436422748de91739006f30e55a6525c269b290fce7301eaf4647c96627153
|
File details
Details for the file uTidylib-0.8-py3-none-any.whl.
File metadata
- Download URL: uTidylib-0.8-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cd5335fa62cb1a5bc8270a67c8e0d71c427afdccd978e08e52a6e5efca67410
|
|
| MD5 |
fa1b0db50a57ceae7cf8749c0b70e89e
|
|
| BLAKE2b-256 |
8e24adf05607f7dcb3fd8a5dd9162e3cad0e37a5deb76458bd7cc8882bbed15a
|