forked from Lainports/freebsd-ports
- Update to 2.35
PR: 129627 Submitted by: Wen Heping <wenheping@gmail.com> (maintainer)
This commit is contained in:
parent
dccef7acdf
commit
c9d55cbc5a
4 changed files with 9 additions and 46 deletions
|
|
@ -6,22 +6,16 @@
|
|||
#
|
||||
|
||||
PORTNAME= html2text
|
||||
PORTVERSION= 2.2.8
|
||||
PORTVERSION= 2.35
|
||||
CATEGORIES= textproc python
|
||||
MASTER_SITES= CENKES
|
||||
MASTER_SITES= CHEESESHOP
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= wenheping@gmail.com
|
||||
COMMENT= Convert HTML into clean plain ASCII text
|
||||
|
||||
USE_ZIP= yes
|
||||
USE_PYTHON= yes
|
||||
USE_PYDISTUTILS=yes
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e '1s|.*|#!${PYTHON_CMD}|' ${WRKSRC}/${PORTNAME}.py
|
||||
|
||||
post-install:
|
||||
@${CHMOD} 755 ${PYTHON_SITELIBDIR}/${PORTNAME}.py
|
||||
@${LN} -sf ${PYTHON_SITELIBDIR}/${PORTNAME}.py ${PREFIX}/bin/
|
||||
USE_PYDISTUTILS=easy_install
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
MD5 (html2text-2.2.8.tar.gz) = 4888df64d1c7556f7cf3ea300bef3af2
|
||||
SHA256 (html2text-2.2.8.tar.gz) = b6754543c44448cf35f706ce8e87ce2f333987d65c7222f7a27b6c36f4e22def
|
||||
SIZE (html2text-2.2.8.tar.gz) = 4002
|
||||
MD5 (html2text-2.35.zip) = bca27646cd1c3bde64d36ba12bedd521
|
||||
SHA256 (html2text-2.35.zip) = 527687294db8a24ead730d3dccba54378694acb8591566f461ec154a92d59720
|
||||
SIZE (html2text-2.35.zip) = 6514
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
--- html2text.py.orig 2007-01-18 19:06:49.000000000 -0500
|
||||
+++ html2text.py
|
||||
@@ -150,7 +150,7 @@ class _html2text(sgmllib.SGMLParser):
|
||||
self.lastWasNL = 0
|
||||
|
||||
def outtextf(self, s):
|
||||
- if type(s) is type(''): s = codecs.utf_8_decode(s)[0]
|
||||
+ if type(s) is type(''): s = codecs.utf_8_decode(s, "replace")[0]
|
||||
self.outtext += s
|
||||
|
||||
def close(self):
|
||||
@@ -259,6 +259,7 @@ class _html2text(sgmllib.SGMLParser):
|
||||
if attrs.has_key('src'):
|
||||
attrs['href'] = attrs['src']
|
||||
alt = attrs.get('alt', '')
|
||||
+ alt = re.sub('\n', ' ', alt)
|
||||
i = self.previousIndex(attrs)
|
||||
if i is not None:
|
||||
attrs = self.a[i]
|
||||
@@ -279,7 +280,7 @@ class _html2text(sgmllib.SGMLParser):
|
||||
if tag in ["ol", "ul"]:
|
||||
if start:
|
||||
self.list.append({'name':tag, 'num':0})
|
||||
- else:
|
||||
+ elif self.list:
|
||||
if self.list: self.list.pop()
|
||||
|
||||
self.p()
|
||||
|
|
@ -1,4 +1 @@
|
|||
bin/html2text.py
|
||||
%%PYTHON_SITELIBDIR%%/html2text.py
|
||||
%%PYTHON_SITELIBDIR%%/html2text.pyc
|
||||
%%PYTHON_SITELIBDIR%%/html2text.pyo
|
||||
%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue