# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
categories-append textproc
maintainers {khindenburg @kurthindenburg} openmaintainer
description Script to turn 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).
homepage https://pypi.python.org/pypi/${realname}
master_sites pypi:[string index ${realname} 0]/${realname}/
distname ${realname}-${version}
checksums rmd160 4acefb71dd07c49b517f0747b8d6db8ea0cbab89 \
sha256 6f56057c5c2993b5cc5b347cb099bdf6d095828fef1b53ef4e2a2bf2a1be9b4f \
python.versions 27 34 35 36 37
if {${name} ne ${subport}} {
depends_lib-append port:py${python.version}-setuptools
depends_run-append port:py-html2text_select
system "find ${worksrcpath} -type d -print0 | xargs -0 chmod a+rx"
system "find ${worksrcpath} -type f -print0 | xargs -0 chmod a+r"
select.group py-html2text
select.file ${filespath}/py${python.version}-html2text
depends_test-append port:py${python.version}-py \
port:py${python.version}-pytest
test.env PYTHONPATH=${worksrcpath}/build/lib
test.cmd py.test-${python.branch}
To make the Python ${python.branch} version of py-html2text the one that is run\
when you execute the commands without a version suffix, e.g. 'html2text', run:
port select --set ${select.group} [file tail ${select.file}]