From owner-svn-ports-all@FreeBSD.ORG Thu Oct 24 15:39:29 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AEFF9330; Thu, 24 Oct 2013 15:39:29 +0000 (UTC) (envelope-from nemysis@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8C8262671; Thu, 24 Oct 2013 15:39:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9OFdTuN024593; Thu, 24 Oct 2013 15:39:29 GMT (envelope-from nemysis@svn.freebsd.org) Received: (from nemysis@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9OFdSjH024583; Thu, 24 Oct 2013 15:39:28 GMT (envelope-from nemysis@svn.freebsd.org) Message-Id: <201310241539.r9OFdSjH024583@svn.freebsd.org> From: Rusmir Dusko Date: Thu, 24 Oct 2013 15:39:28 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r331496 - in head/textproc: . extract_url extract_url/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Oct 2013 15:39:29 -0000 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 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 +# $FreeBSD$ + +PORTNAME= extract_url +PORTVERSION= 1.5.8 +CATEGORIES= textproc +MASTER_SITES= GOOGLE_CODE +PROJECTHOST= extracturl + +MAINTAINER= horia@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 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 +@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 +@exec if [ -f %D/etc/extract_urlview ] ; then cp -p %D/%F %B/extract_urlview ; fi +man/man1/extract_url.1.gz