svn commit: r331496 - in head/textproc: . extract_url extract_url/files
Rusmir Dusko
nemysis at FreeBSD.org
Thu Oct 24 15:39:29 UTC 2013
Author: nemysis
Date: Thu Oct 24 15:39:27 2013
New Revision: 331496
URL: http://svnweb.freebsd.org/changeset/ports/331496
Log:
This is a Perl script that extracts URLs from correctly-encoded MIME
email messages or plain text. This can be used either as a
pre-parser for urlview, or to replace urlview entirely.
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). An alternative
design is to access URLs from within mutt's pager by defining macros
and tagging the URLs in the display to indicate which macro to use.
A script you can use to do that is tagurl.pl.
Main features:
- Configurable
- Handles URLs that have been broken over several lines in
format=flowed delsp=yes email messages
- Handles quoted-printable email messages
- Sanitizes URLs so that they can't break out of the command shell
WWW: http://www.memoryhole.net/~kyle/extract_url/
PR: ports/180022
Submitted by: Horia Racoviceanu <horia at racoviceanu.com>
Approved by: wg (mentor)
Added:
head/textproc/extract_url/
head/textproc/extract_url/Makefile (contents, props changed)
head/textproc/extract_url/distinfo (contents, props changed)
head/textproc/extract_url/files/
head/textproc/extract_url/files/extract_urlview (contents, props changed)
head/textproc/extract_url/files/pkg-message.in (contents, props changed)
head/textproc/extract_url/pkg-descr (contents, props changed)
head/textproc/extract_url/pkg-plist (contents, props changed)
Modified:
head/textproc/Makefile
Modified: head/textproc/Makefile
==============================================================================
--- head/textproc/Makefile Thu Oct 24 15:16:10 2013 (r331495)
+++ head/textproc/Makefile Thu Oct 24 15:39:27 2013 (r331496)
@@ -173,6 +173,7 @@
SUBDIR += exmpp
SUBDIR += expat2
SUBDIR += exslt
+ SUBDIR += extract_url
SUBDIR += ezxml
SUBDIR += fa-aspell
SUBDIR += fcitx-m17n
Added: head/textproc/extract_url/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/textproc/extract_url/Makefile Thu Oct 24 15:39:27 2013 (r331496)
@@ -0,0 +1,56 @@
+# Created by: Horia Racoviceanu <horia at racoviceanu.com>
+# $FreeBSD$
+
+PORTNAME= extract_url
+PORTVERSION= 1.5.8
+CATEGORIES= textproc
+MASTER_SITES= GOOGLE_CODE
+PROJECTHOST= extracturl
+
+MAINTAINER= horia at racoviceanu.com
+COMMENT= Perl script that extracts URLs from email in MIME or plain text format
+
+LICENSE= BSD
+
+BUILD_DEPENDS= p5-MIME-Tools>=0:${PORTSDIR}/mail/p5-MIME-Tools \
+ p5-HTML-Parser>=0:${PORTSDIR}/www/p5-HTML-Parser
+RUN_DEPENDS:= ${BUILD_DEPENDS}
+
+USES= gmake perl5
+
+MAKE_ARGS= all prefix=${PREFIX} man_prefix=${PREFIX}
+
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
+SUB_FILES= pkg-message
+
+OPTIONS_DEFINE= DOCS GETOPT_LONG URI_FIND
+OPTIONS_RADIO= URL_SELECTOR
+OPTIONS_RADIO_URL_SELECTOR= CURSES_UI URLVIEW
+OPTIONS_DEFAULT= CURSES_UI GETOPT_LONG URI_FIND
+
+CURSES_UI_DESC= Allows it to fully replace urlview
+GETOPT_LONG_DESC= Recognizes long options --version and --list
+URI_FIND_DESC= Recognizes more exotic URL variations in plain text
+URLVIEW_DESC= Uses urlview for the URL selector menu
+
+OPTIONS_SUB= yes
+
+CURSES_UI_RUN_DEPENDS= p5-Curses-UI>=0:${PORTSDIR}/devel/p5-Curses-UI
+GETOPT_LONG_RUN_DEPENDS= p5-Getopt-Long>=0:${PORTSDIR}/devel/p5-Getopt-Long
+URLVIEW_RUN_DEPENDS= urlview>=0:${PORTSDIR}/textproc/urlview
+URI_FIND_RUN_DEPENDS= p5-URI-Find>=0:${PORTSDIR}/textproc/p5-URI-Find
+
+PORTDOCS= AUTHORS NEWS README
+
+post-patch:
+ @${REINPLACE_CMD} '/pod2man.mk/s|make|${GMAKE}|' \
+ ${WRKSRC}/${MAKEFILE}
+
+post-install:
+ ${INSTALL_DATA} ${FILESDIR}/${PORTNAME}view ${STAGEDIR}${PREFIX}/etc/${PORTNAME}view.sample
+
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
Added: head/textproc/extract_url/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/textproc/extract_url/distinfo Thu Oct 24 15:39:27 2013 (r331496)
@@ -0,0 +1,2 @@
+SHA256 (extract_url-1.5.8.tar.gz) = 58eac907cb926deba74ab81e7503a1055fd3cbe20952f011d8e6b75da12d6bcc
+SIZE (extract_url-1.5.8.tar.gz) = 13861
Added: head/textproc/extract_url/files/extract_urlview
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/textproc/extract_url/files/extract_urlview Thu Oct 24 15:39:27 2013 (r331496)
@@ -0,0 +1,31 @@
+################################
+### extract_url(1) configuration
+#
+# Copy this file to ~/.extract_urlview
+
+# Command used to view URLs
+#COMMAND firefox %s &
+
+# URL will be opened without prompting when emails contains only one
+#SHORTCUT
+
+# Turn off showing the full URL before opening it
+#NOREVIEW
+
+# Disable the automatic exit of URL selection menu after viewing a URL
+#PERSISTENT
+
+# Ignore links that don't correspond to any text
+#IGNORE_EMPTY_TAGS
+
+# Specify which HTML tags will be examined for URLs
+#HTML_TAGS a,applet,area,blockquote,embed,form,frame,iframe,input,ins,isindex,head,layer,link,object,q,script,xmp
+
+# Key for PERSISTENT behaviour, or opposite if PERSISTENT is specified
+#ALTSELECT k
+
+# Show [url] list or show URLs in [context] when the program is run
+#DEFAULT_VIEW url
+
+# Sanitize URLs before they are displayed
+#DISPLAY_SANITIZED
Added: head/textproc/extract_url/files/pkg-message.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/textproc/extract_url/files/pkg-message.in Thu Oct 24 15:39:27 2013 (r331496)
@@ -0,0 +1,9 @@
+===============================================================================
+
+extract_url has been installed.
+
+Sample configuration is installed, please adjust it
+
+ %%PREFIX%%/etc/extract_urlview.sample
+
+===============================================================================
Added: head/textproc/extract_url/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/textproc/extract_url/pkg-descr Thu Oct 24 15:39:27 2013 (r331496)
@@ -0,0 +1,20 @@
+This is a Perl script that extracts URLs from correctly-encoded MIME
+email messages or plain text. This can be used either as a
+pre-parser for urlview, or to replace urlview entirely.
+
+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). An alternative
+design is to access URLs from within mutt's pager by defining macros
+and tagging the URLs in the display to indicate which macro to use.
+A script you can use to do that is tagurl.pl.
+
+Main features:
+ - Configurable
+ - Handles URLs that have been broken over several lines in
+ format=flowed delsp=yes email messages
+ - Handles quoted-printable email messages
+ - Sanitizes URLs so that they can't break out of the command shell
+
+WWW: http://www.memoryhole.net/~kyle/extract_url/
Added: head/textproc/extract_url/pkg-plist
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/textproc/extract_url/pkg-plist Thu Oct 24 15:39:27 2013 (r331496)
@@ -0,0 +1,5 @@
+bin/extract_url
+ at unexec if cmp -s %D/etc/extract_urlview %D/etc/extract_urlview.sample ; then rm -f %D/etc/extract_urlview ; fi
+etc/extract_urlview.sample
+ at exec if [ -f %D/etc/extract_urlview ] ; then cp -p %D/%F %B/extract_urlview ; fi
+man/man1/extract_url.1.gz
More information about the svn-ports-all
mailing list