Import extract_url 1.6

This is a Perl script that extracts URLs from correctly-encoded MIME email
messages. This can be used either as a pre-parser for urlview, or to replace
urlview entirely.

Urlview is a great program, but has some deficiencies. In particular, it isn't
particularly configurable, and cannot handle URLs that have been broken over
several lines in format=flowed delsp=yes email messages. Nor can it handle
quoted-printable email messages. Also, urlview doesn't eliminate duplicate
URLs. This Perl script handles all of that. It also sanitizes URLs so that
they can't break out of the command shell.

This is designed primarily for use with the mutt emailer. The idea is that if
you want to access a URL in an email, you pipe the email to a URL extractor
(like this one) which then lets you select a URL to view in some third program
(such as Firefox).

OK sthen@, tb@
This commit is contained in:
feinerer 2016-01-06 17:53:37 +00:00
parent ccad5237c2
commit 1d55dd807f
4 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,42 @@
# $OpenBSD: Makefile,v 1.1.1.1 2016/01/06 17:53:37 feinerer Exp $
COMMENT = extract URLs from MIME email messages or plain text
VERSION = 1.6
DISTNAME = extract_url-${VERSION}
CATEGORIES = textproc
HOMEPAGE = http://www.memoryhole.net/~kyle/extract_url/
MAINTAINER = Ingo Feinerer <feinerer@logic.at>
# BSD
PERMIT_PACKAGE_CDROM = Yes
GH_ACCOUNT = m3m0ryh0l3
GH_PROJECT = extracturl
GH_TAGNAME = v${VERSION}
BUILD_DEPENDS = mail/p5-MIME-tools \
www/p5-HTML-Parser
RUN_DEPENDS = devel/p5-Curses-UI \
mail/p5-MIME-tools \
www/p5-HTML-Parser \
www/p5-URI-Find
FAKE_FLAGS = man_prefix=${PREFIX} \
prefix=${PREFIX}
USE_GMAKE = Yes
post-patch:
sed -i "/pod2man.mk/s/make/${GMAKE}/" ${WRKSRC}/Makefile
sed -i "s/extract_url.pl/extract_url/g" ${WRKSRC}/extract_url.pl
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/extract_url
${INSTALL_DATA} ${WRKSRC}/extract_urlview.sample \
${PREFIX}/share/examples/extract_url
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (extract_url-1.6.tar.gz) = L4+0w2GgLuAFPS4XkdKD6bICKX5Lhh1/9nasAEON3K8=
SIZE (extract_url-1.6.tar.gz) = 15764

View File

@ -0,0 +1,15 @@
This is a Perl script that extracts URLs from correctly-encoded MIME email
messages. This can be used either as a pre-parser for urlview, or to replace
urlview entirely.
Urlview is a great program, but has some deficiencies. In particular, it isn't
particularly configurable, and cannot handle URLs that have been broken over
several lines in format=flowed delsp=yes email messages. Nor can it handle
quoted-printable email messages. Also, urlview doesn't eliminate duplicate
URLs. This Perl script handles all of that. It also sanitizes URLs so that
they can't break out of the command shell.
This is designed primarily for use with the mutt emailer. The idea is that if
you want to access a URL in an email, you pipe the email to a URL extractor
(like this one) which then lets you select a URL to view in some third program
(such as Firefox).

View File

@ -0,0 +1,5 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2016/01/06 17:53:37 feinerer Exp $
bin/extract_url
@man man/man1/extract_url.1
share/examples/extract_url/
share/examples/extract_url/extract_urlview.sample