Package: urlview
Version: 0.9-21
Severity: wishlist
Tags: patch upstream

Dear Maintainer,

Gemini is a system to access information on the Internet. A competitor of the
Web for some use cases. It is described at https://gemini.circumlunar.space/
Gemini uses URLs.

The patch in the configuration files allow urlview to access Gemini URLs. At
the present time, there is in sid only one Gemini client, the Emacs mode
Elpher. In the mean time, I added two common clients in the configuration file.
I assume that the integration of my patch will have to wait for these clients
to be packaged?



-- System Information:
Debian Release: 10.7
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 4.19.0-14-686-pae (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages urlview depends on:
ii  libc6           2.28-10
ii  libncurses6     6.1+20181013-2+deb10u2
ii  libtinfo6       6.1+20181013-2+deb10u2
ii  sensible-utils  0.0.12

Versions of packages urlview recommends:
ii  firefox-esr [www-browser]  78.7.0esr-1~deb10u1
ii  lynx [www-browser]         2.8.9rel.1-3
ii  w3m [www-browser]          0.5.3-37

Versions of packages urlview suggests:
ii  mutt   1.10.1-2.1+deb10u5
ii  ncftp  2:3.2.5-2.1
ii  wget   1.20.1-1.1

-- Configuration Files:
/etc/urlview/system.urlview changed:
REGEXP (((http|https|ftp|gopher|gemini)|mailto):(//)?[^ 
<>"\t]*|(www|ftp)[0-9]?\.[-a-z0-9.]+)[^ .,;\t\n\r<">\):]?[^, <>"\t]*[^ 
.,;\t\n\r<">\):]
COMMAND /etc/urlview/url_handler.sh

/etc/urlview/url_handler.sh changed:
http_prgs="/usr/bin/sensible-browser:PW /usr/bin/sensible-browser:XT 
/usr/bin/galeon:PW /usr/bin/konqueror:PW /usr/bin/mozilla:PW /usr/bin/lynx:XT 
/usr/bin/w3m:XT /usr/bin/links:XT"
https_prgs=$http_prgs
mailto_prgs="/usr/bin/mutt:VT /usr/bin/elm:VT /usr/bin/alpine:VT 
/usr/bin/pine:VT /usr/bin/mail:VT"
gopher_prgs="/usr/bin/gopher:XT /usr/bin/lynx:XT"
gemini_prgs="/usr/local/bin/lagrange:XW /usr/bin/amfora:XT"
ftp_prgs="/usr/bin/ncftp:XT /usr/bin/lftp:XT $http_prgs"
file_prgs="/usr/bin/wget:XT /usr/bin/snarf:XT"
XTERM=/usr/bin/x-terminal-emulator
function getprg()
{
    local ele tag prog
    for ele in $*
    do
        tag=${ele##*:}
        prog=${ele%%:*}
        if [ -x $prog ]; then
            case $tag in
            PW) [ -n "$DISPLAY" ] && echo "P:$prog" && return 0
                ;;
            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|www[1-9])
        type=http
        ;;
    esac
    url=$type://$url
fi
if [ "$type" = "ftp" ]; then
    filename=${url##*/}
    if [ $filename ]; then
        echo "Is \"$filename\" a file? (y/N)";
        read x
        case $x in 
        y|Y)
                type=file
                ;;
        *)
                ;;
        esac
    fi
fi
case $type in
https)
    prg=`getprg $https_prgs`
    ;;
http)
    prg=`getprg $http_prgs`
    ;;
ftp)
    prg=`getprg $ftp_prgs`
    ;;
mailto)
    prg=`getprg $mailto_prgs`
    ;;
gopher)
    prg=`getprg $gopher_prgs`
    ;;
gemini)
    prg=`getprg $gemini_prgs`
    ;;
file)
    prg=`getprg $file_prgs`
    ;;
*)
    echo "Unknown URL type.  Please report URL and viewer to"
    echo "urlv...@packages.debian.org."
    echo -n "Press enter to continue.."; read x
    exit
    ;;
esac
if [ -n "$prg" ]; then
   if [ "${prg%:*}" = "P" ]; then
    nohup ${prg#*:} $url 2>/dev/null 1>/dev/null &
   elif [ "${prg%:*}" = "X" ]; then
    ${prg#*:} $url 2>/dev/null &
   else
    $prg $url
   fi
fi


-- no debconf information

Reply via email to