-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: uritools action: commit revision: path_from: revision_from: 840a373b74a8202801126af195177b9964e8377a: path_to: revision_to:
commit 840a373b74a8202801126af195177b9964e8377a Author: epoch <epoch@hack.thebackupbox.net> Date: Mon Oct 19 01:36:21 2020 +0000 added support for gopher links of type 1 and 0 diff --git a/urititle b/urititle
--- a/urititle +++ b/urititle @@ -59,6 +59,16 @@ magnet) ftp) curl "$1" 2>&1 | tail -n1 ;; +gopher) + type="$(printf "%s\n" "$1" | uricut -p | cut -b2- | cut -b1)" + if [ "$type" = 1 -o "$type" = "" ];then + printf "title: %s\n" "$(curl -s "$1" | grep ^i | head -n1 | cut -f1 | cut -b2-)" + elif [ "$type" = 0 ];then + printf "title: %s\n" "$(curl -s "$1" | head -n1)" + else + printf "title: don't know how to get title of non-1 gopher links" + fi + ;; ssh) if [ ! "$port" ];then port=22
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 15:05:26 2024