projects
/
lace
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e8f2635
)
will not look for favicon.txt by default
author
frrobert2 <frrobert@stnectarios.org>
Thu, 10 Jun 2021 20:34:10 +0000
(16:34 -0400)
committer
frrobert2 <frrobert@stnectarios.org>
Thu, 10 Jun 2021 20:34:10 +0000
(16:34 -0400)
laced
patch
|
blob
|
history
diff --git
a/laced
b/laced
index debf5475ba4fc2021a78a894bc5b455ea8dd69c2..91314a48dd23516c11db0afb315c8e1276f0d28e 100755
(executable)
--- a/
laced
+++ b/
laced
@@
-90,20
+90,22
@@
function timeline() {
url="$url/"
fi
domain=$(sed 's/\/.*$//' <<< "$domain")
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
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"
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
fi
@@
-130,6
+132,7
@@
function timeline() {
wordcount="$(wc -c $tmpfile | awk '{print $1}')"
if [[ "$wordcount" > 100 ]]; then
cp $tmpfile $config_place/microblogs.gmi
wordcount="$(wc -c $tmpfile | awk '{print $1}')"
if [[ "$wordcount" > 100 ]]; then
cp $tmpfile $config_place/microblogs.gmi
+ cp $tmpfile /mnt/geminiserver/gemini/lace.gmi
else
sed -i '1i Laced could not connect to the Internet showing previous download' $config_place/microblogs.gmi
else
sed -i '1i Laced could not connect to the Internet showing previous download' $config_place/microblogs.gmi