Hello community, here is the log from the commit of package python3-html2text for openSUSE:Factory checked in at 2016-04-03 23:07:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-html2text (Old) and /work/SRC/openSUSE:Factory/.python3-html2text.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-html2text" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-html2text/python3-html2text.changes 2016-01-20 09:55:11.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python3-html2text.new/python3-html2text.changes 2016-04-03 23:07:29.000000000 +0200 @@ -1,0 +2,10 @@ +Sat Apr 2 03:38:44 UTC 2016 - [email protected] + +- update to version 2016.4.2: + * Fix #106: encoding by stdin + * Fix #89: Python 3.5 support. + * Fix #113: inplace baseurl substitution for <a> and <img> tags. + * Feature #118: Update the badges to badge.kloud51.com + * Fix #119: new-line after a list is inserted + +------------------------------------------------------------------- Old: ---- html2text-2016.1.8.tar.gz New: ---- html2text-2016.4.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-html2text.spec ++++++ --- /var/tmp/diff_new_pack.svqzJC/_old 2016-04-03 23:07:30.000000000 +0200 +++ /var/tmp/diff_new_pack.svqzJC/_new 2016-04-03 23:07:30.000000000 +0200 @@ -17,7 +17,7 @@ Name: python3-html2text -Version: 2016.1.8 +Version: 2016.4.2 Release: 0 Url: https://github.com/Alir3z4/html2text/ Summary: Turn HTML into equivalent Markdown-structured text ++++++ html2text-2016.1.8.tar.gz -> html2text-2016.4.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html2text-2016.1.8/AUTHORS.rst new/html2text-2016.4.2/AUTHORS.rst --- old/html2text-2016.1.8/AUTHORS.rst 2015-11-04 15:32:38.000000000 +0100 +++ new/html2text-2016.4.2/AUTHORS.rst 2016-04-01 23:55:11.000000000 +0200 @@ -19,6 +19,7 @@ * Albert Berger <gh: nbdsp> * Etienne Millon <[email protected]> * John C F <gh: critiqjo> +* Mikhail Melnik <[email protected]> Maintainer: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html2text-2016.1.8/ChangeLog.rst new/html2text-2016.4.2/ChangeLog.rst --- old/html2text-2016.1.8/ChangeLog.rst 2016-01-08 17:35:35.000000000 +0100 +++ new/html2text-2016.4.2/ChangeLog.rst 2016-04-01 23:57:46.000000000 +0200 @@ -1,3 +1,14 @@ +2016.4.2 +========= +---- + +* Fix #106: encoding by stdin +* Fix #89: Python 3.5 support. +* Fix #113: inplace baseurl substitution for <a> and <img> tags. +* Feature #118: Update the badges to badge.kloud51.com +* Fix #119: new-line after a list is inserted + + 2016.1.8 ========= ---- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html2text-2016.1.8/PKG-INFO new/html2text-2016.4.2/PKG-INFO --- old/html2text-2016.1.8/PKG-INFO 2016-01-08 17:40:00.000000000 +0100 +++ new/html2text-2016.4.2/PKG-INFO 2016-04-02 00:00:15.000000000 +0200 @@ -1,12 +1,99 @@ Metadata-Version: 1.1 Name: html2text -Version: 2016.1.8 +Version: 2016.4.2 Summary: Turn HTML into equivalent Markdown-structured text. Home-page: https://github.com/Alir3z4/html2text/ Author: Alireza Savand Author-email: [email protected] License: GNU GPL 3 -Description: UNKNOWN +Description: # html2text + + [](http://travis-ci.org/Alir3z4/html2text) + [](https://coveralls.io/r/Alir3z4/html2text) + [](https://pypi.python.org/pypi/html2text/) + [](https://pypi.python.org/pypi/html2text/) + [](https://pypi.python.org/pypi/html2text/) + [](https://pypi.python.org/pypi/html2text/) + [](https://pypi.python.org/pypi/html2text/) + + + html2text is a Python script that converts a page of HTML into clean, easy-to-read plain ASCII text. Better yet, that ASCII also happens to be valid Markdown (a text-to-HTML format). + + + Usage: `html2text [(filename|url) [encoding]]` + + | Option | Description + |--------------------------------------------------------|--------------------------------------------------- + | `--version` | Show program's version number and exit + | `-h`, `--help` | Show this help message and exit + | `--ignore-links` | Don't include any formatting for links + |`--escape-all` | Escape all special characters. Output is less readable, but avoids corner case formatting issues. + | `--reference-links` | Use reference links instead of links to create markdown + | `--mark-code` | Mark preformatted and code blocks with [code]...[/code] + + For a complete list of options see the [docs](docs/usage.md) + + + Or you can use it from within `Python`: + + ``` + >>> import html2text + >>> + >>> print(html2text.html2text("<p><strong>Zed's</strong> dead baby, <em>Zed's</em> dead.</p>")) + **Zed's** dead baby, _Zed's_ dead. + + ``` + + + Or with some configuration options: + ``` + >>> import html2text + >>> + >>> h = html2text.HTML2Text() + >>> # Ignore converting links from HTML + >>> h.ignore_links = True + >>> print h.handle("<p>Hello, <a href='http://earth.google.com/'>world</a>!") + Hello, world! + + >>> print(h.handle("<p>Hello, <a href='http://earth.google.com/'>world</a>!")) + + Hello, world! + + >>> # Don't Ignore links anymore, I like links + >>> h.ignore_links = False + >>> print(h.handle("<p>Hello, <a href='http://earth.google.com/'>world</a>!")) + Hello, [world](http://earth.google.com/)! + + ``` + + *Originally written by Aaron Swartz. This code is distributed under the GPLv3.* + + + ## How to install + + `html2text` is available on pypi + https://pypi.python.org/pypi/html2text + + ``` + $ pip install html2text + ``` + + + ## How to run unit tests + + PYTHONPATH=$PYTHONPATH:. coverage run --source=html2text setup.py test -v + + To see the coverage results: + + coverage combine + coverage html + + then open the `./htmlcov/index.html` file in your browser. + + ## Documentation + + Documentation lives [here](docs/index.md) + Platform: OS Independent Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers @@ -24,3 +111,4 @@ Classifier: Programming Language :: Python :: 3.2 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html2text-2016.1.8/README.md new/html2text-2016.4.2/README.md --- old/html2text-2016.1.8/README.md 2015-11-04 15:32:38.000000000 +0100 +++ new/html2text-2016.4.2/README.md 2016-04-01 23:55:11.000000000 +0200 @@ -2,12 +2,11 @@ [](http://travis-ci.org/Alir3z4/html2text) [](https://coveralls.io/r/Alir3z4/html2text) -[](https://pypi.python.org/pypi/html2text/) -[](https://pypi.python.org/pypi/html2text/) -[](https://pypi.python.org/pypi/html2text/) -[](https://pypi.python.org/pypi/html2text/) -[](https://pypi.python.org/pypi/html2text/) -[](https://pypi.python.org/pypi/html2text/) +[](https://pypi.python.org/pypi/html2text/) +[](https://pypi.python.org/pypi/html2text/) +[](https://pypi.python.org/pypi/html2text/) +[](https://pypi.python.org/pypi/html2text/) +[](https://pypi.python.org/pypi/html2text/) html2text is a Python script that converts a page of HTML into clean, easy-to-read plain ASCII text. Better yet, that ASCII also happens to be valid Markdown (a text-to-HTML format). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html2text-2016.1.8/html2text/__init__.py new/html2text-2016.4.2/html2text/__init__.py --- old/html2text-2016.1.8/html2text/__init__.py 2016-01-08 17:39:25.000000000 +0100 +++ new/html2text-2016.4.2/html2text/__init__.py 2016-04-01 23:58:02.000000000 +0200 @@ -3,6 +3,7 @@ """html2text: Turn HTML into equivalent Markdown-structured text.""" from __future__ import division import re +import sys import cgi try: @@ -29,7 +30,7 @@ skipwrap ) -__version__ = (2016, 1, 8) +__version__ = (2016, 4, 2) # TODO: @@ -44,7 +45,10 @@ appends lines of text). baseurl: base URL of the document we process """ - HTMLParser.HTMLParser.__init__(self) + kwargs = {} + if sys.version_info >= (3, 4): + kwargs['convert_charrefs'] = False + HTMLParser.HTMLParser.__init__(self, **kwargs) # Config options self.split_next_td = False @@ -416,9 +420,9 @@ try: title = escape_md(a['title']) except KeyError: - self.o("](" + escape_md(a['href']) + ")") + self.o("](" + escape_md(urlparse.urljoin(self.baseurl, a['href'])) + ")") else: - self.o("](" + escape_md(a['href']) + self.o("](" + escape_md(urlparse.urljoin(self.baseurl, a['href'])) + ' "' + title + '" )') else: i = self.previousIndex(a) @@ -472,7 +476,7 @@ self.o("![" + escape_md(alt) + "]") if self.inline_links: href = attrs.get('href') or '' - self.o("(" + escape_md(href) + ")") + self.o("(" + escape_md(urlparse.urljoin(self.baseurl, href)) + ")") else: i = self.previousIndex(attrs) if i is not None: @@ -510,6 +514,8 @@ else: if self.list: self.list.pop() + if (not self.google_doc) and (not self.list): + self.o('\n') self.lastWasList = True else: self.lastWasList = False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html2text-2016.1.8/html2text/cli.py new/html2text-2016.4.2/html2text/cli.py --- old/html2text-2016.1.8/html2text/cli.py 2015-11-04 15:32:38.000000000 +0100 +++ new/html2text-2016.4.2/html2text/cli.py 2016-04-01 23:55:11.000000000 +0200 @@ -195,12 +195,13 @@ # process input encoding = "utf-8" + if len(args) == 2: + encoding = args[1] + elif len(args) > 2: + p.error('Too many arguments') + if len(args) > 0 and args[0] != '-': # pragma: no cover file_ = args[0] - if len(args) == 2: - encoding = args[1] - if len(args) > 2: - p.error('Too many arguments') if file_.startswith('http://') or file_.startswith('https://'): baseurl = file_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html2text-2016.1.8/html2text.egg-info/PKG-INFO new/html2text-2016.4.2/html2text.egg-info/PKG-INFO --- old/html2text-2016.1.8/html2text.egg-info/PKG-INFO 2016-01-08 17:39:59.000000000 +0100 +++ new/html2text-2016.4.2/html2text.egg-info/PKG-INFO 2016-04-02 00:00:15.000000000 +0200 @@ -1,12 +1,99 @@ Metadata-Version: 1.1 Name: html2text -Version: 2016.1.8 +Version: 2016.4.2 Summary: Turn HTML into equivalent Markdown-structured text. Home-page: https://github.com/Alir3z4/html2text/ Author: Alireza Savand Author-email: [email protected] License: GNU GPL 3 -Description: UNKNOWN +Description: # html2text + + [](http://travis-ci.org/Alir3z4/html2text) + [](https://coveralls.io/r/Alir3z4/html2text) + [](https://pypi.python.org/pypi/html2text/) + [](https://pypi.python.org/pypi/html2text/) + [](https://pypi.python.org/pypi/html2text/) + [](https://pypi.python.org/pypi/html2text/) + [](https://pypi.python.org/pypi/html2text/) + + + html2text is a Python script that converts a page of HTML into clean, easy-to-read plain ASCII text. Better yet, that ASCII also happens to be valid Markdown (a text-to-HTML format). + + + Usage: `html2text [(filename|url) [encoding]]` + + | Option | Description + |--------------------------------------------------------|--------------------------------------------------- + | `--version` | Show program's version number and exit + | `-h`, `--help` | Show this help message and exit + | `--ignore-links` | Don't include any formatting for links + |`--escape-all` | Escape all special characters. Output is less readable, but avoids corner case formatting issues. + | `--reference-links` | Use reference links instead of links to create markdown + | `--mark-code` | Mark preformatted and code blocks with [code]...[/code] + + For a complete list of options see the [docs](docs/usage.md) + + + Or you can use it from within `Python`: + + ``` + >>> import html2text + >>> + >>> print(html2text.html2text("<p><strong>Zed's</strong> dead baby, <em>Zed's</em> dead.</p>")) + **Zed's** dead baby, _Zed's_ dead. + + ``` + + + Or with some configuration options: + ``` + >>> import html2text + >>> + >>> h = html2text.HTML2Text() + >>> # Ignore converting links from HTML + >>> h.ignore_links = True + >>> print h.handle("<p>Hello, <a href='http://earth.google.com/'>world</a>!") + Hello, world! + + >>> print(h.handle("<p>Hello, <a href='http://earth.google.com/'>world</a>!")) + + Hello, world! + + >>> # Don't Ignore links anymore, I like links + >>> h.ignore_links = False + >>> print(h.handle("<p>Hello, <a href='http://earth.google.com/'>world</a>!")) + Hello, [world](http://earth.google.com/)! + + ``` + + *Originally written by Aaron Swartz. This code is distributed under the GPLv3.* + + + ## How to install + + `html2text` is available on pypi + https://pypi.python.org/pypi/html2text + + ``` + $ pip install html2text + ``` + + + ## How to run unit tests + + PYTHONPATH=$PYTHONPATH:. coverage run --source=html2text setup.py test -v + + To see the coverage results: + + coverage combine + coverage html + + then open the `./htmlcov/index.html` file in your browser. + + ## Documentation + + Documentation lives [here](docs/index.md) + Platform: OS Independent Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers @@ -24,3 +111,4 @@ Classifier: Programming Language :: Python :: 3.2 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html2text-2016.1.8/html2text.egg-info/SOURCES.txt new/html2text-2016.4.2/html2text.egg-info/SOURCES.txt --- old/html2text-2016.1.8/html2text.egg-info/SOURCES.txt 2016-01-08 17:40:00.000000000 +0100 +++ new/html2text-2016.4.2/html2text.egg-info/SOURCES.txt 2016-04-02 00:00:15.000000000 +0200 @@ -63,6 +63,8 @@ test/images_with_size.md test/img-tag-with-link.html test/img-tag-with-link.md +test/inplace_baseurl_substitution.html +test/inplace_baseurl_substitution.md test/invalid_start.html test/invalid_start.md test/invalid_unicode.html @@ -101,5 +103,7 @@ test/single_line_break.md test/test_html2text.py test/test_memleak.py +test/text_after_list.html +test/text_after_list.md test/url-escaping.html test/url-escaping.md \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html2text-2016.1.8/setup.py new/html2text-2016.4.2/setup.py --- old/html2text-2016.1.8/setup.py 2015-11-04 15:58:13.000000000 +0100 +++ new/html2text-2016.4.2/setup.py 2016-04-01 23:55:11.000000000 +0200 @@ -1,6 +1,11 @@ # coding: utf-8 import sys from setuptools import setup, Command, find_packages +try: + from pypandoc import convert + read_md = lambda f: convert(f, 'rst') +except ImportError: + read_md = lambda f: open(f, 'r').read() requires_list = [] try: @@ -36,6 +41,7 @@ name="html2text", version=".".join(map(str, __import__('html2text').__version__)), description="Turn HTML into equivalent Markdown-structured text.", + long_description=read_md('README.md'), author="Aaron Swartz", author_email="[email protected]", maintainer='Alireza Savand', @@ -60,6 +66,7 @@ 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', ], entry_points=""" [console_scripts] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html2text-2016.1.8/test/inplace_baseurl_substitution.html new/html2text-2016.4.2/test/inplace_baseurl_substitution.html --- old/html2text-2016.1.8/test/inplace_baseurl_substitution.html 1970-01-01 01:00:00.000000000 +0100 +++ new/html2text-2016.4.2/test/inplace_baseurl_substitution.html 2016-04-01 23:55:11.000000000 +0200 @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<head></head> +<body> +<p> +<img src="/uploads/2012/01/read2textheader.jpg" alt="read2text header image" width="650" height="165"/> +</p> +<p> +<a href="/">BrettTerpstra.com</a> +</p> +</body> +</html> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html2text-2016.1.8/test/inplace_baseurl_substitution.md new/html2text-2016.4.2/test/inplace_baseurl_substitution.md --- old/html2text-2016.1.8/test/inplace_baseurl_substitution.md 1970-01-01 01:00:00.000000000 +0100 +++ new/html2text-2016.4.2/test/inplace_baseurl_substitution.md 2016-04-01 23:55:11.000000000 +0200 @@ -0,0 +1,3 @@ + + +[BrettTerpstra.com](http://brettterpstra.com/) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html2text-2016.1.8/test/list_tags_example.md new/html2text-2016.4.2/test/list_tags_example.md --- old/html2text-2016.1.8/test/list_tags_example.md 2015-11-04 15:32:38.000000000 +0100 +++ new/html2text-2016.4.2/test/list_tags_example.md 2016-04-01 23:55:11.000000000 +0200 @@ -28,9 +28,11 @@ * some item * Some other item * some item + 1. Some other item 2. some item 3. some item + * somthing else here * some item diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html2text-2016.1.8/test/test_html2text.py new/html2text-2016.4.2/test/test_html2text.py --- old/html2text-2016.1.8/test/test_html2text.py 2015-11-04 15:32:38.000000000 +0100 +++ new/html2text-2016.4.2/test/test_html2text.py 2016-04-01 23:55:11.000000000 +0200 @@ -173,6 +173,12 @@ if base_fn not in ['bodywidth_newline.html', 'abbr_tag.html']: test_func = None + if base_fn == 'inplace_baseurl_substitution.html': + module_args['baseurl'] = 'http://brettterpstra.com' + module_args['body_width'] = 0 + # there is no way to specify baseurl in cli :( + test_cmd = None + return test_mod, test_cmd, test_func # Originally from http://stackoverflow.com/questions/32899/\ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html2text-2016.1.8/test/text_after_list.html new/html2text-2016.4.2/test/text_after_list.html --- old/html2text-2016.1.8/test/text_after_list.html 1970-01-01 01:00:00.000000000 +0100 +++ new/html2text-2016.4.2/test/text_after_list.html 2016-04-01 23:55:11.000000000 +0200 @@ -0,0 +1,2 @@ +<ul><li>item</li></ul> +text diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html2text-2016.1.8/test/text_after_list.md new/html2text-2016.4.2/test/text_after_list.md --- old/html2text-2016.1.8/test/text_after_list.md 1970-01-01 01:00:00.000000000 +0100 +++ new/html2text-2016.4.2/test/text_after_list.md 2016-04-01 23:55:11.000000000 +0200 @@ -0,0 +1,4 @@ + * item + +text + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html2text-2016.1.8/test/url-escaping.html new/html2text-2016.4.2/test/url-escaping.html --- old/html2text-2016.1.8/test/url-escaping.html 2015-02-18 14:16:15.000000000 +0100 +++ new/html2text-2016.4.2/test/url-escaping.html 2016-04-01 23:55:11.000000000 +0200 @@ -6,8 +6,8 @@ <li><a href="http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d(v=vs.110)">Some MSDN link using parenthesis</a></li> <li><a href="https://www.google.ru/search?q=[brackets are cool]">Google search result URL with unescaped brackets</a></li> <li><a href="https://www.google.ru/search?q='[({})]'">Yet another test for [brackets], {curly braces} and (parenthesis) processing inside the anchor</a></li> - <li>Use automatic links like <a href="http://example.com/">http://example.com/</a> when the URL is the label</a> - <li>Exempt <a href="non-absolute_URIs">non-absolute_URIs</a> from automatic link detection</a> + <li>Use automatic links like <a href="http://example.com/">http://example.com/</a> when the URL is the label</a></li> + <li>Exempt <a href="non-absolute_URIs">non-absolute_URIs</a> from automatic link detection</a></li> </ul> <p>And here are images with tricky attribute values:</p>
