diff -u -Naur urlview-0.9.orig/system.urlview urlview-0.9.fink/system.urlview --- urlview-0.9.orig/system.urlview Wed Dec 31 19:00:00 1969 +++ urlview-0.9.fink/system.urlview Tue Jan 21 21:16:22 2003 @@ -0,0 +1,10 @@ +# +# Sample urlview(1) configuration file +# + +# regular expression to use to match URLs +REGEXP (((http|https|ftp|gopher)|mailto):(//)?[^ <>"\t]*|www\.[-a-z0-9.]+)[^ .,;\t<">\):] + +# command to invoke for selected URL +COMMAND /etc/urlview/url_handler.sh + diff -u -Naur urlview-0.9.orig/url_handler.sh.fink urlview-0.9.fink/url_handler.sh.fink --- urlview-0.9.orig/url_handler.sh.fink Wed Dec 31 19:00:00 1969 +++ urlview-0.9.fink/url_handler.sh.fink Tue Jan 21 21:11:28 2003 @@ -0,0 +1,120 @@ +#! /bin/bash + +# Copyright (c) 1998 Martin Schulze <joey@debian.org> +# Slightly modified by Luis Francisco Gonzalez <luisgh@debian.org> + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +########################################################################### +# Configurable section +########################################################################### +# +# Any entry in the lists of programs that urlview handler will try out will +# be made of /path/to/program + ':' + TAG where TAG is one of +# XW: XWindows program +# XT: Launch with an xterm if possible or as VT if not +# VT: Launch in the same terminal + +# The lists of programs to be executed are +https_prgs="/usr/X11R6/bin/netscape:XW /usr/bin/lynx:XT" +http_prgs="/usr/bin/lynx:XT /usr/X11R6/bin/netscape:XW" +mailto_prgs="/usr/bin/mutt:VT /usr/bin/elm:VT /usr/bin/pine:VT /usr/bin/mail:VT" +gopher_prgs="/usr/bin/lynx:XT /usr/bin/gopher:XT" +ftp_prgs="/usr/bin/lynx:XT /usr/bin/ncftp:XT" + +# Program used as an xterm (if it doesn't support -T you'll need to change +# the command line in getprg) +XTERM=/usr/X11R6/bin/xterm + + +########################################################################### +# Change bellow this at your own risk +########################################################################### +function getprg() +{ + local ele tag prog + + for ele in $* + do + tag=${ele##*:} + prog=${ele%%:*} + if [ -x $prog ]; then + case $tag in + XW) + [ -n "$DISPLAY" ] && echo "X:$prog" && return 0 + ;; + XT) + [ -n "$DISPLAY" ] && [ -x "$XTERM" ] && \ + echo "X:$XTERM -e $prog" && return 0 + echo "$prog" && return 0 + ;; + VT) + echo "$prog" && return 0 + ;; + esac + fi + done +} + +url="$1"; shift + +type="${url%%:*}" + +if [ "$url" = "$type" ]; then + type="${url%%.*}" + case "$type" in + www|web) + type=http + ;; + esac + url="$type://$url" +fi + +case $type in +https) + prg=`getprg $https_prgs` + ;; +http) + prg=`getprg $http_prgs` + ;; +ftp) + prg=`getprg $ftp_prgs` + ;; +mailto) + prg=`getprg $mailto_prgs` + url="${url#mailto:}" + ;; +gopher) + prg=`getprg $gopher_prgs` + ;; +*) + echo "Unknown URL type. Please report URL and viewer to:" + echo "joey@debian.org." + echo -n "Press enter to continue."; read x + exit + ;; +esac + +if [ -n "$prg" ]; then + if [ "${prg%:*}" = "X" ]; then + ${prg#*:} "$url" 2>/dev/null & + else + $prg "$url" + fi +fi + + + + diff -u -Naur urlview-0.9.orig/urlview.c urlview-0.9.fink/urlview.c --- urlview-0.9.orig/urlview.c Tue Jul 4 06:14:30 2000 +++ urlview-0.9.fink/urlview.c Tue Jan 21 21:09:10 2003 @@ -48,7 +48,7 @@ #define DEFAULT_REGEXP "(((https?|ftp|gopher)://|(mailto|file|news):)[^' \t<>\"]+|(www|web|w3)\\.[-a-z0-9.]+)[^' \t.,;<>\"\\):]" #define DEFAULT_COMMAND "url_handler.sh %s" -#define SYSTEM_INITFILE "/etc/urlview.conf" +#define SYSTEM_INITFILE "@PREFIX@/etc/urlview.conf" #define OFFSET 2 #define PAGELEN (LINES - 1 - OFFSET) diff -u -Naur urlview-0.9.orig/urlview.html urlview-0.9.fink/urlview.html --- urlview-0.9.orig/urlview.html Wed Dec 31 19:00:00 1969 +++ urlview-0.9.fink/urlview.html Tue Jan 21 22:00:58 2003 @@ -0,0 +1,90 @@ +<HTML> +<HEAD><TITLE>urlview - URL extractor/launcher</TITLE></HEAD> +<BODY> +<H2><A NAME="ss0.1">0.1 NAME</A> +</H2> + +<P>urlview - URL extractor/launcher</P> + +<H2><A NAME="ss0.2">0.2 SYNOPSIS</A> +</H2> + +<P>urlview <filename> [ <filename> ... ]</P> + +<H2><A NAME="ss0.3">0.3 DESCRIPTION</A> +</H2> + +<P><EM>urlview</EM> is a screen oriented program for extracting URLs from text +files and displaying a menu from which you may launch a command to view a +specific item.</P> + +<H2><A NAME="ss0.4">0.4 CONFIGURATION</A> +</H2> + +<P><EM>urlview</EM> attempts to read <EM>~/.urlview</EM> upon startup. +If this file doesn't exist, it will try to read a system wide file +in <EM>/etc/urlview/system.urlview</EM>. There are +two configuration commands (order does not matter):</P> +<P>REGEXP <regular expression to use for URL matching></P> + +<P><EM>urlview</EM> uses a regular expression to extract URLs from the specified +text files. \r, \t, \n and \f are all converted to +their normal printf(2) meanings. The default REGEXP is</P> +<P> +<PRE> +(((https?|ftp|gopher)://|(mailto|file|news):)[^' \t<>"]+|(www|web|w3)\.[-a-z0-9.]+)[^' \t.,;<>"\):] +</PRE> +</P> + +<P>COMMAND <command to launch with URL></P> +<P>If the specified command contains a ``%s'', it will be subsituted +with the URL that was requested, otherwise the URL is appended to the +COMMAND string. The default COMMAND is +<PRE> + url_handler.sh '%s' +</PRE> + +another possibility would be +<PRE> + Netscape -remote 'openURL(%s)' +</PRE> + +<B>NOTE:</B> you should always put single quotes ('') around usage of +``%s'' and never let the REGEXP to match any string containing +a single quote (note <CODE>[⁁'...]</CODE> in the default REGEXP) +to avoid characters in the selected URL from being interpreted +by your shell. For example, I could put the following URL in my email +messages: +<PRE> + X-Nasty-Url: http://www.`program_to_execute_as_you`.com +</PRE> + +If you pass this URL to your shell, it could have nasty consequences.</P> + +<H2><A NAME="ss0.5">0.5 FILES</A> +</H2> + +<P> +<DL> +<DT><B>/etc/urlview/system.urlview</B><DD><P>system-wide urlview configuration file</P> +<DT><B>~/.urlview</B><DD><P>urlview configuration file</P> +</DL> +</P> + +<H2><A NAME="ss0.6">0.6 SEE ALSO</A> +</H2> + +<P>regcomp(3)</P> + +<H2><A NAME="ss0.7">0.7 AUTHOR</A> +</H2> + +<P>Michael Elkins <me@cs.hmc.edu>. +Modified for Debian by Luis Francisco Gonzalez <luisgh@debian.org>. +Modified for SuSE by Dr. Werner Fink <werner@suse.de> and Stepan Kasal <kasal@suse.cz>.</P> +<HR> +Next +Previous +Contents +</BODY> +</HTML> diff -u -Naur urlview-0.9.orig/urlview.man urlview-0.9.fink/urlview.man --- urlview-0.9.orig/urlview.man Tue Jul 4 06:14:30 2000 +++ urlview-0.9.fink/urlview.man Tue Jan 21 21:09:34 2003 @@ -34,7 +34,7 @@ upon startup. If this file doesn't exist, it will try to read a system wide file in -.IR /etc/urlview.conf . +.IR @PREFIX@/etc/urlview.conf . There are two configuration commands (order does not matter): .TP REGEXP \fIregexp\fP @@ -76,7 +76,7 @@ explicitly excludes single quotes.) .SH FILES .PP -.IP "/etc/urlview.conf" +.IP "@PREFIX@/etc/urlview.conf" system-wide urlview configuration file .IP "~/.urlview" urlview configuration file diff -u -Naur urlview-0.9.orig/urlview.sgml urlview-0.9.fink/urlview.sgml --- urlview-0.9.orig/urlview.sgml Tue Jul 4 06:14:30 2000 +++ urlview-0.9.fink/urlview.sgml Tue Jan 21 21:09:49 2003 @@ -20,7 +20,7 @@ <p> <em/urlview/ attempts to read <em>˜/.urlview</em> upon startup. If this file doesn't exist, it will try to read a system wide file -in <em>/etc/urlview.conf</em>. There are +in <em>/@PREFIX@etc/urlview.conf</em>. There are two configuration commands (order does not matter): <p> REGEXP <regular expression to use for URL matching> @@ -62,7 +62,7 @@ <p> <descrip> <tag> -/etc/urlview.conf +@PREFIX@/etc/urlview.conf <p> system-wide urlview configuration file <tag>