From ffefb4d23d438033c1b8e753dea15feaca272a88 Mon Sep 17 00:00:00 2001 From: Kubilay Kocak Date: Sun, 27 Jul 2014 12:50:26 +0000 Subject: [PATCH] [NEW] textproc/py-pytidylib: Python wrapper for HTML Tidy PyTidyLib is a Python package that wraps the HTML Tidy library. This allows you, from Python code, to "fix" invalid (X)HTML markup. Some of the library's many capabilities include: * Clean up unclosed tags and unescaped characters such as ampersands * Output HTML 4 or XHTML, strict or transitional, and add missing doctypes * Convert named entities to numeric entities, which can then be used in XML documents without an HTML doctype. * Clean up HTML from programs such as Word (to an extent) * Indent the output, including proper (i.e. no) indenting for pre elements, which some (X)HTML indenting code overlooks. WWW: http://countergram.com/open-source/pytidylib --- textproc/Makefile | 1 + textproc/py-pytidylib/Makefile | 26 ++++++++++++++++++++++++++ textproc/py-pytidylib/distinfo | 2 ++ textproc/py-pytidylib/pkg-descr | 13 +++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 textproc/py-pytidylib/Makefile create mode 100644 textproc/py-pytidylib/distinfo create mode 100644 textproc/py-pytidylib/pkg-descr diff --git a/textproc/Makefile b/textproc/Makefile index fa441baf842a..2d0c9a3386a0 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1178,6 +1178,7 @@ SUBDIR += py-pyscss SUBDIR += py-pysrt SUBDIR += py-pystache + SUBDIR += py-pytidylib SUBDIR += py-pyx12 SUBDIR += py-qt4-xml SUBDIR += py-qt4-xmlpatterns diff --git a/textproc/py-pytidylib/Makefile b/textproc/py-pytidylib/Makefile new file mode 100644 index 000000000000..e4d6934481a2 --- /dev/null +++ b/textproc/py-pytidylib/Makefile @@ -0,0 +1,26 @@ +# Created by: Kubilay Kocak +# $FreeBSD$ + +PORTNAME= pytidylib +PORTVERSION= 0.2.3 +CATEGORIES= textproc python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= koobs@FreeBSD.org +COMMENT= Python wrapper for HTML Tidy + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libtidy.so:${PORTSDIR}/www/tidy-lib +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:${PORTSDIR}/devel/py-pytest + +USE_PYTHON= yes +USE_PYDISTUTILS= yes +PYDISTUTILS_AUTOPLIST= yes + +regression-test: build + @cd ${WRKSRC} && ${PYTHON_CMD} -m pytest + +.include diff --git a/textproc/py-pytidylib/distinfo b/textproc/py-pytidylib/distinfo new file mode 100644 index 000000000000..19c2cedf07b1 --- /dev/null +++ b/textproc/py-pytidylib/distinfo @@ -0,0 +1,2 @@ +SHA256 (pytidylib-0.2.3.tar.gz) = e7d28eb3191b80ede405691820368630f2fa0d64885b389ae42f8f50ad6a11e5 +SIZE (pytidylib-0.2.3.tar.gz) = 86515 diff --git a/textproc/py-pytidylib/pkg-descr b/textproc/py-pytidylib/pkg-descr new file mode 100644 index 000000000000..5554c07a368c --- /dev/null +++ b/textproc/py-pytidylib/pkg-descr @@ -0,0 +1,13 @@ +PyTidyLib is a Python package that wraps the HTML Tidy library. This allows +you, from Python code, to "fix" invalid (X)HTML markup. Some of the library's +many capabilities include: + + * Clean up unclosed tags and unescaped characters such as ampersands + * Output HTML 4 or XHTML, strict or transitional, and add missing doctypes + * Convert named entities to numeric entities, which can then be used in XML + documents without an HTML doctype. + * Clean up HTML from programs such as Word (to an extent) + * Indent the output, including proper (i.e. no) indenting for pre elements, + which some (X)HTML indenting code overlooks. + +WWW: http://countergram.com/open-source/pytidylib