summaryrefslogtreecommitdiffstats
path: root/python/html2text
diff options
context:
space:
mode:
Diffstat (limited to 'python/html2text')
-rw-r--r--python/html2text/README9
-rw-r--r--python/html2text/html2text.SlackBuild55
-rw-r--r--python/html2text/html2text.info10
-rw-r--r--python/html2text/slack-desc12
4 files changed, 44 insertions, 42 deletions
diff --git a/python/html2text/README b/python/html2text/README
index 6e69b48a74..927db5fb6d 100644
--- a/python/html2text/README
+++ b/python/html2text/README
@@ -1,3 +1,8 @@
-html2text (Python HTML-to-text converter)
+html2text (turn HTML into equivalent Markdown-structured text)
-It turns HTML into equivalent Markdown-structured text.
+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).
+
+html2text can be used as a standalone program ("html2text --help" for
+usage) or as a Python library (import html2text).
diff --git a/python/html2text/html2text.SlackBuild b/python/html2text/html2text.SlackBuild
index b837837b2e..50a6a5a9c2 100644
--- a/python/html2text/html2text.SlackBuild
+++ b/python/html2text/html2text.SlackBuild
@@ -1,9 +1,10 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for html2text
-# Copyright 2011 crocket (crockabiscuit@gmail.com)
+# Copyright 2011 crocket (email removed)
# Copyright 2013-2015 LukenShiro, Italy
+# Copyright 2020 B. Watson
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,40 +24,39 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20200203 bkw:
+# - new maintainer
+# - i486 => i586
+# - upstream dropped support for python 2.x, so require python3
+# - expand README and slack-desc
+# - get rid of unused template code
+# - don't install test/ in docdir
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=html2text
-VERSION=${VERSION:-2015.11.4}
+VERSION=${VERSION:-2020.1.16}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
-DOCFILES="AUTHORS.rst ChangeLog.rst COPYING README.md test/"
-
set -e
rm -rf $PKG
@@ -66,20 +66,17 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-python setup.py install --root=$PKG
+python3 setup.py install --root=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a $DOCFILES $PKG/usr/doc/$PRGNAM-$VERSION/
+cp -a *.rst *.md COPYING $PKG/usr/doc/$PRGNAM-$VERSION/
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/python/html2text/html2text.info b/python/html2text/html2text.info
index 0c1c64ac6b..1e6fcc1fc6 100644
--- a/python/html2text/html2text.info
+++ b/python/html2text/html2text.info
@@ -1,10 +1,10 @@
PRGNAM="html2text"
-VERSION="2015.11.4"
+VERSION="2020.1.16"
HOMEPAGE="https://github.com/Alir3z4/html2text"
-DOWNLOAD="https://pypi.python.org/packages/source/h/html2text/html2text-2015.11.4.tar.gz"
-MD5SUM="51bdf631d39ba577b8b66497fb17aed9"
+DOWNLOAD="https://github.com/Alir3z4/html2text/archive/2020.1.16/html2text-2020.1.16.tar.gz"
+MD5SUM="1581148a70b6963216c2a3deaa3c3870"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="LukenShiro"
-EMAIL="lukenshiro@ngi.it"
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/python/html2text/slack-desc b/python/html2text/slack-desc
index 11972df67f..a0b802744d 100644
--- a/python/html2text/slack-desc
+++ b/python/html2text/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-html2text: html2text (Python HTML-to-text converter)
-html2text:
-html2text: It turns HTML into equivalent Markdown-structured text.
-html2text:
-html2text: Homepage: http://www.aaronsw.com/2002/html2text
-html2text:
+html2text: html2text (turn HTML into equivalent Markdown-structured text)
html2text:
+html2text: html2text is a Python script that converts a page of HTML into clean,
+html2text: easy-to-read plain ASCII text. Better yet, that ASCII also happens
+html2text: to be valid Markdown (a text-to-HTML format).
html2text:
+html2text: html2text can be used as a standalone program ("html2text --help"
+html2text: for usage) or as a Python library (import html2text).
html2text:
html2text:
html2text: