Metadata-Version: 2.1
Name: libtidy
Version: 5.9.14a1
Summary: Python binding for the libtidy C library.
Author: Adam Karpierz
Author-email: adam@karpierz.net
Maintainer: Adam Karpierz
Maintainer-email: adam@karpierz.net
License: HTML Tidy License ; https://spdx.org/licenses/HTMLTIDY.html
Project-URL: Homepage, https://pypi.org/project/libtidy/
Project-URL: Documentation, https://libtidy.readthedocs.io/
Project-URL: Download, https://pypi.org/project/libtidy/
Project-URL: Source, https://github.com/karpierz/libtidy
Project-URL: Issues, https://github.com/karpierz/libtidy/issues
Keywords: tidy,libtidy,html,html5,xml
Platform: any
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: Free To Use But Restricted
Classifier: Operating System :: OS Independent
Classifier: Natural Language :: Polish
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <4.0.0,>=3.9.0
Description-Content-Type: text/x-rst; charset=UTF-8
License-File: LICENSE
Requires-Dist: setuptools>=75.1.0
Requires-Dist: pkg-about>=1.2.1
Provides-Extra: doc
Requires-Dist: Sphinx>=7.4.7; extra == "doc"
Requires-Dist: sphinx-toolbox>=3.8.0; extra == "doc"
Requires-Dist: sphinx-tabs>=3.4.7; extra == "doc"
Requires-Dist: sphinx-copybutton>=0.5.2; extra == "doc"
Requires-Dist: sphinxcontrib-spelling>=8.0.0; extra == "doc"
Requires-Dist: sphinx-lint>=1.0.0; extra == "doc"
Requires-Dist: restructuredtext-lint>=1.4.0; extra == "doc"
Requires-Dist: nbsphinx>=0.9.5; extra == "doc"
Provides-Extra: test
Requires-Dist: deepdiff>=8.0.1; extra == "test"
Requires-Dist: rich>=13.9.2; extra == "test"

libtidy
=======

Python binding for the *libtidy* C library.

Overview
========

| Python |package_bold| module is a low-level binding for *libtidy* C library.
| It is an effort to allow python programs full access to the API implemented and
  provided by the well known `*libtidy* <https://www.html-tidy.org/developer/>`__
  library.

`PyPI record`_.

`Documentation`_.

| |package_bold| is a lightweight Python package, based on the *ctypes* library.
| It is fully compliant implementation of the original C *libtidy* API
  by implementing whole its functionality in a clean Python instead of C.
|
| *libtidy* API documentation can be found at:

  `libtidy API Reference <https://api.html-tidy.org/tidy/tidylib_api_next/>`__

|package_bold| 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:

.. code:: python

  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 <https://www.html-tidy.org/developer/>`__:

**libtidy Introduction**

libtidy is the library version of `HTML Tidy <https://www.html-tidy.org/>`__.
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

  * https://www.python.org/
  * with C libtidy 5.9.14 is a primary test environment.

+ pip and setuptools

  * https://pypi.org/project/pip/
  * https://pypi.org/project/setuptools/

To install run:

  .. parsed-literal::

    python -m pip install --upgrade |package|

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:

  .. parsed-literal::

    git clone |respository| |package|

and run:

  .. parsed-literal::

    python -m pip install ./|package|

or on development mode:

  .. parsed-literal::

    python -m pip install --editable ./|package|

License
=======

  | |copyright|
  | Licensed under the HTML Tidy License
  | https://spdx.org/licenses/HTMLTIDY.html
  | Please refer to the accompanying LICENSE file.

Authors
=======

* Adam Karpierz <adam@karpierz.net>

.. |package| replace:: libtidy
.. |package_bold| replace:: **libtidy**
.. |copyright| replace:: Copyright (c) 2024-2024 Adam Karpierz
.. |respository| replace:: https://github.com/karpierz/libtidy.git
.. _Development page: https://github.com/karpierz/libtidy
.. _PyPI record: https://pypi.org/project/libtidy/
.. _Documentation: https://libtidy.readthedocs.io/

Changelog
=========

5.9.14a1 (2024-10-10)
---------------------
- First release.

0.0.0 (2024-10-10)
------------------
- Initial commit.
