will not look for favicon by default
authorfrrobert2 <frrobert@stnectarios.org>
Thu, 10 Jun 2021 20:42:03 +0000 (16:42 -0400)
committerfrrobert2 <frrobert@stnectarios.org>
Thu, 10 Jun 2021 20:42:03 +0000 (16:42 -0400)
lace

diff --git a/lace b/lace
index bf89aeb6c87d4156a0d61ec8cc12d6c1a6e481b9..57c66634c0dc550ccbb0720c5295e539c175b962 100755 (executable)
--- a/lace
+++ b/lace
@@ -90,20 +90,22 @@ function timeline() {
                                url="$url/"
                        fi
                        domain=$(sed 's/\/.*$//' <<< "$domain")
-                       fav=$(timeout $connectto openssl s_client -crlf -quiet -connect "$domain:1965" <<<"gemini://$domain/favicon.txt" 2>/dev/null | sed -e '1d')
+               timeout $connectto openssl s_client -crlf -quiet -connect "$domain:1965" <<<"$url" 2>/dev/null > $tmpfile3
                        timeoutstatus=${PIPESTATUS[0]}
                        if [ $timeoutstatus -ne 124 ];then
-                       if [ ! -z "$fav" ];then
-                               user="$fav $user"
-                       fi
-                       timeout $connectto openssl s_client -crlf -quiet -connect "$domain:1965" <<<"$url" 2>/dev/null > $tmpfile3
-               local newuser=$(cat $tmpfile3 | grep -m 1 author: | awk -F ":" '{print $2}'  )
+                       local newuser=$(cat $tmpfile3 | grep -m 1 author: | awk -F ":" '{print $2}'  )
                local newavatar=$(cat $tmpfile3 | grep -m 1 avatar: | awk -F ":" '{print $2}'  )
                        if [[ $newuser != "" ]]
                        then
        newuser=$(echo "$newuser" | xargs)
        newavatar=$(echo "$newavatar" | xargs)
                user="$newavatar $newuser"
+       else
+       fav=$(timeout $connectto openssl s_client -crlf -quiet -connect "$domain:1965" <<<"gemini://$domain/favicon.txt" 2>/dev/null | sed -e '1d')
+if [ ! -z "$fav" ];then
+       user="$fav $user"
+       fi
+               
                        fi
 
                        cat $tmpfile3 | sed -e '1d' | sed -n '/##/,$p' | sed -e "s/^\(## .*\)$/\1\n${esc}$red$user${esc}$nc ($domain)/g" >> $tmpfile