Python binding for the libtidy C library.
Project description
libtidy
Python binding for the libtidy C library.
Overview
libtidy uses the underlying libtidy C shared library as specified in libtidy.cfg (included libtidy-X.X.* is the default), but there is also ability to specify it programmatically by one of the following ways:
import libtidy
libtidy.config(LIBTIDY="libtidy C shared library absolute path")
# or
libtidy.config(LIBTIDY=None) # included libtidy-X.X.* will be used
About original libtidy:
Borrowed from the original website:
libtidy Introduction
libtidy is the library version of HTML Tidy. In fact, Tidy is libtidy; the console application is a very simple C application that links against libtidy. It’s what powers Tidy, mod-tidy, and countless other applications that perform tidying.
Design factors
libtidy is Thread Safe and Re-entrant. Because there are many uses for HTML Tidy - from content validation, content scraping, conversion to XHTML - it was important to make libtidy run reasonably well within server applications as well as client side.
Requirements
- It is a fully independent package.All necessary things are installed during the normal installation process.
ATTENTION: currently works and tested only for Windows.
Installation
Prerequisites:
Python 3.9 or higher
with C libtidy 5.9.14 is a primary test environment.
pip and setuptools
To install run:
python -m pip install --upgrade libtidy
Development
Prerequisites:
Development is strictly based on tox. To install it run:
python -m pip install --upgrade tox
Visit Development page.
Installation from sources:
clone the sources:
git clone https://github.com/karpierz/libtidy.git libtidy
and run:
python -m pip install ./libtidy
or on development mode:
python -m pip install --editable ./libtidy
License
Copyright (c) 2024-2024 Adam KarpierzLicensed under the HTML Tidy LicensePlease refer to the accompanying LICENSE file.
Changelog
5.9.14a1 (2024-10-10)
First release.
0.0.0 (2024-10-10)
Initial commit.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file libtidy-5.9.14a1.zip
.
File metadata
- Download URL: libtidy-5.9.14a1.zip
- Upload date:
- Size: 615.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d169c12ad85a2cd19ec2858180d0228cadb1f832a97e1c156f366c924cf61d9d |
|
MD5 | a502b16b47485dc678185866a3a24621 |
|
BLAKE2b-256 | 588d3673b90f60ef2cd1d62895686c468a14dda1fd9513e0147ee1f317a84d9f |
File details
Details for the file libtidy-5.9.14a1-py3-none-any.whl
.
File metadata
- Download URL: libtidy-5.9.14a1-py3-none-any.whl
- Upload date:
- Size: 596.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c518a4a47f91255775ddf6c9c0052350ba6e7b482ec60cf3252d4b190d423a0 |
|
MD5 | 8cea8b740f296bb4b73adf0e674e521a |
|
BLAKE2b-256 | 93646ebb5ae567f71c35ae0d3252def6eec765597d352289b9c8ffe1e079d588 |