From ceb612c0ce4077a95d59b29ff6f1856f75eb4583 Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Sun, 4 Apr 2021 18:35:25 -0400 Subject: curl: Be silent --- ccel.sh | 3 ++- gcc.sh | 6 +++--- net.sh | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ccel.sh b/ccel.sh index 2a9b2b2..9b59c73 100755 --- a/ccel.sh +++ b/ccel.sh @@ -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 diff --git a/gcc.sh b/gcc.sh index 874a86e..6d55641 100755 --- a/gcc.sh +++ b/gcc.sh @@ -3,7 +3,7 @@ if [ "$PATH_INFO" = "" ] then printf "20 text/gemini\r\n" - curl https://gccsatx.com/hymns/ | grep ' 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@ @#@g' | sed 's@ | Hymn Lyrics and Piano Music@@g'\ | sed 's@

@##@g' | sed 's@@@g'\ | sed 's@

@@g' \ diff --git a/net.sh b/net.sh index 06c2936..5ddaa16 100755 --- a/net.sh +++ b/net.sh @@ -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@[0-9:]*@@g' | sed 's@@@g' +curl -s "$req" | sed 's@ *[0-9:]* *@ @g' | sed 's@@@g' # end with a newline echo '' echo '(NET)' -- cgit 1.4.1