PKG-INFO 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. Metadata-Version: 1.1
  2. Name: pytidylib
  3. Version: 0.3.2
  4. Summary: Python wrapper for HTML Tidy (tidylib) on Python 2 and 3
  5. Home-page: http://countergram.com/open-source/pytidylib/
  6. Author: Jason Stitt
  7. Author-email: js@jasonstitt.com
  8. License: UNKNOWN
  9. Description: `PyTidyLib`_ is a Python package that wraps the `HTML Tidy`_ library. This
  10. allows you, from Python code, to "fix" invalid (X)HTML markup. Some of the
  11. library's many capabilities include:
  12. * Clean up unclosed tags and unescaped characters such as ampersands
  13. * Output HTML 4 or XHTML, strict or transitional, and add missing doctypes
  14. * Convert named entities to numeric entities, which can then be used in XML
  15. documents without an HTML doctype.
  16. * Clean up HTML from programs such as Word (to an extent)
  17. * Indent the output, including proper (i.e. no) indenting for ``pre`` elements,
  18. which some (X)HTML indenting code overlooks.
  19. Changes
  20. =======
  21. * 0.3.2: Initialization bug fix
  22. * 0.3.1: find_library support while still allowing a list of library names
  23. * 0.3.0: Refactored to use Tidy and PersistentTidy classes while keeping the
  24. functional interface (which will lazily create a global Tidy() object) for
  25. backward compatibility. You can now pass a list of library names and base
  26. options when instantiating Tidy. The keep_doc argument is now deprecated
  27. and does nothing; use PersistentTidy.
  28. * 0.2.4: Bugfix for a strange memory allocation corner case in Tidy.
  29. * 0.2.3: Python 3 support (2 + 3 cross compatible) with passing Tox tests.
  30. Small example of use
  31. ====================
  32. The following code cleans up an invalid HTML document and sets an option::
  33. from tidylib import tidy_document
  34. document, errors = tidy_document('''<p>f&otilde;o <img src="bar.jpg">''',
  35. options={'numeric-entities':1})
  36. print document
  37. print errors
  38. Docs
  39. ====
  40. Documentation is shipped with the source distribution and is available at
  41. the `PyTidyLib`_ web page.
  42. .. _`HTML Tidy`: http://tidy.sourceforge.net/
  43. .. _`PyTidyLib`: http://countergram.com/open-source/pytidylib/
  44. Platform: UNKNOWN
  45. Classifier: Development Status :: 5 - Production/Stable
  46. Classifier: Environment :: Other Environment
  47. Classifier: Intended Audience :: Developers
  48. Classifier: License :: OSI Approved :: MIT License
  49. Classifier: Programming Language :: Python
  50. Classifier: Programming Language :: Python :: 3
  51. Classifier: Natural Language :: English
  52. Classifier: Topic :: Utilities
  53. Classifier: Topic :: Text Processing :: Markup :: HTML
  54. Classifier: Topic :: Text Processing :: Markup :: XML