forked from pool/python-pytidylib
Accepting request 416394 from home:susnux:branches:devel:languages:python
This package replaces python-pytidylib6 (and this also builds on tumbleweed) OBS-URL: https://build.opensuse.org/request/show/416394 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytidylib?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
5
python-pytidylib.changes
Normal file
5
python-pytidylib.changes
Normal file
@@ -0,0 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 23 17:24:53 UTC 2016 - rpm@fthiessen.de
|
||||
|
||||
- Initial package 0.2.4
|
||||
|
75
python-pytidylib.spec
Normal file
75
python-pytidylib.spec
Normal file
@@ -0,0 +1,75 @@
|
||||
#
|
||||
# spec file for package python-pytidylib
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%else
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
Name: python-pytidylib
|
||||
Version: 0.2.4
|
||||
Release: 0
|
||||
Summary: Python wrapper for HTML Tidy (tidylib) on Python 2 and 3
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
Url: http://countergram.com/open-source/pytidylib/
|
||||
Source: https://pypi.python.org/packages/b4/a0/b70cf2b7b4ee1f9d8fa0f1b4abbbac081a2638a580dabf29b8fb554d5fc1/pytidylib-%{version}.tar.gz
|
||||
BuildRequires: libtidy-devel
|
||||
BuildRequires: python-devel
|
||||
Requires: libtidy5
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
`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.
|
||||
|
||||
Small example of use
|
||||
====================
|
||||
|
||||
The following code cleans up an invalid HTML document and sets an option::
|
||||
|
||||
from tidylib import tidy_document
|
||||
document, errors = tidy_document('''<p>fõo <img src="bar.jpg">''',
|
||||
options={'numeric-entities':1})
|
||||
print document
|
||||
print errors
|
||||
|
||||
%prep
|
||||
%setup -q -n pytidylib-%{version}
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE README
|
||||
%{python_sitelib}/*
|
||||
|
||||
%changelog
|
3
pytidylib-0.2.4.tar.gz
Normal file
3
pytidylib-0.2.4.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0af07bd8ebd256af70ca925ada9337faf16d85b3072624f975136a5134150ab6
|
||||
size 86650
|
Reference in New Issue
Block a user