scripts for my gemini capsule
curl: Be silent
| -rwxr-xr-x | ccel.sh | 3 | ||||
| -rwxr-xr-x | gcc.sh | 6 | ||||
| -rwxr-xr-x | net.sh | 2 |
3 files changed, 6 insertions, 5 deletions
@@ -12,6 +12,7 @@ then exit 0 fi printf "20 text/gemini\r\n" + printf "=> %s This page was automatically generated from the following CCEL book (http)\n" https://ccel.org/ccel/"$QUERY_STRING" printf "=> /thml2gmi/ and converted with thml2gmi\n" -curl https://ccel.org/ccel/"$QUERY_STRING".xml | ./thml2gmi.py /dev/stdin +curl -s https://ccel.org/ccel/"$QUERY_STRING".xml | ./thml2gmi.py /dev/stdin @@ -3,7 +3,7 @@ if [ "$PATH_INFO" = "" ] then printf "20 text/gemini\r\n" - curl https://gccsatx.com/hymns/ | grep ' <a href="https://gccsatx.com/hymns/' | cut -d/ -f5 | sed 's@^@=>gcc.sh/@g' + curl -s https://gccsatx.com/hymns/ | grep ' <a href="https://gccsatx.com/hymns/' | cut -d/ -f5 | sed 's@^@=>gcc.sh/@g' exit 0 fi @@ -11,14 +11,14 @@ hasmp3=$(echo "$QUERY_STRING"|grep 'mp3') if [ ! "$hasmp3" = "" ] then printf "20 audio/mpeg\r\n" - mp3=$(curl https://gccsatx.com/hymns$PATH_INFO/ | grep \.mp3 | sed 's/ /\n/g' | grep \.mp3 | grep href | cut -d'"' -f2) + mp3=$(curl -s https://gccsatx.com/hymns$PATH_INFO/ | grep \.mp3 | sed 's/ /\n/g' | grep \.mp3 | grep href | cut -d'"' -f2) curl --output - $mp3 exit 0 fi printf "20 text/gemini\r\n" printf "=>/cgi-bin/gcc.sh$PATH_INFO?.mp3 Listen to this!\n" -curl https://gccsatx.com/hymns$PATH_INFO/ \ +curl -s https://gccsatx.com/hymns$PATH_INFO/ \ | sed 's@ <title>@#@g' | sed 's@ | Hymn Lyrics and Piano Music</title>@@g'\ | sed 's@<p><strong>@##@g' | sed 's@</strong>@@g'\ | sed 's@<p>@@g' \ @@ -14,7 +14,7 @@ req="$(printf 'https://labs.bible.org/api/?passage=%s&type=text' "$qs")" #echo "$req" echo "#$qs" | sed 's/+/ /g' # todo: indicate scripture citations and allusions? -curl "$req" | sed 's@<b>[0-9:]*</b>@@g' | sed 's@</\?b>@@g' +curl -s "$req" | sed 's@ *<b>[0-9:]*</b> *@ @g' | sed 's@</\?b>@@g' # end with a newline echo '' echo '(NET)' |