diff options
author | Rusmir Dusko <nemysis@FreeBSD.org> | 2013-10-24 15:39:27 +0000 |
---|---|---|
committer | Rusmir Dusko <nemysis@FreeBSD.org> | 2013-10-24 15:39:27 +0000 |
commit | 1724ff21730ea38a720d5b1a2184c70ec0e7a0f2 (patch) | |
tree | 5e971b19e8c9a3efd39308a344038b49d3acc011 /textproc/extract_url | |
parent | 7e984d580c727350fc414d07f34282fe3f9dab67 (diff) | |
download | ports-1724ff21730ea38a720d5b1a2184c70ec0e7a0f2.tar.gz ports-1724ff21730ea38a720d5b1a2184c70ec0e7a0f2.zip |
Notes
Diffstat (limited to 'textproc/extract_url')
-rw-r--r-- | textproc/extract_url/Makefile | 56 | ||||
-rw-r--r-- | textproc/extract_url/distinfo | 2 | ||||
-rw-r--r-- | textproc/extract_url/files/extract_urlview | 31 | ||||
-rw-r--r-- | textproc/extract_url/files/pkg-message.in | 9 | ||||
-rw-r--r-- | textproc/extract_url/pkg-descr | 20 | ||||
-rw-r--r-- | textproc/extract_url/pkg-plist | 5 |
6 files changed, 123 insertions, 0 deletions
diff --git a/textproc/extract_url/Makefile b/textproc/extract_url/Makefile new file mode 100644 index 000000000000..b6096d20e3c7 --- /dev/null +++ b/textproc/extract_url/Makefile @@ -0,0 +1,56 @@ +# Created by: Horia Racoviceanu <horia@racoviceanu.com> +# $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 <bsd.port.mk> diff --git a/textproc/extract_url/distinfo b/textproc/extract_url/distinfo new file mode 100644 index 000000000000..90df858c7f65 --- /dev/null +++ b/textproc/extract_url/distinfo @@ -0,0 +1,2 @@ +SHA256 (extract_url-1.5.8.tar.gz) = 58eac907cb926deba74ab81e7503a1055fd3cbe20952f011d8e6b75da12d6bcc +SIZE (extract_url-1.5.8.tar.gz) = 13861 diff --git a/textproc/extract_url/files/extract_urlview b/textproc/extract_url/files/extract_urlview new file mode 100644 index 000000000000..b08a38f4bddb --- /dev/null +++ b/textproc/extract_url/files/extract_urlview @@ -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 diff --git a/textproc/extract_url/files/pkg-message.in b/textproc/extract_url/files/pkg-message.in new file mode 100644 index 000000000000..af543370f861 --- /dev/null +++ b/textproc/extract_url/files/pkg-message.in @@ -0,0 +1,9 @@ +=============================================================================== + +extract_url has been installed. + +Sample configuration is installed, please adjust it + + %%PREFIX%%/etc/extract_urlview.sample + +=============================================================================== diff --git a/textproc/extract_url/pkg-descr b/textproc/extract_url/pkg-descr new file mode 100644 index 000000000000..6c3ca114d54e --- /dev/null +++ b/textproc/extract_url/pkg-descr @@ -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/ diff --git a/textproc/extract_url/pkg-plist b/textproc/extract_url/pkg-plist new file mode 100644 index 000000000000..117cf54a8bdb --- /dev/null +++ b/textproc/extract_url/pkg-plist @@ -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 |