about summary refs log tree commit diff
path: root/gcc.sh
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2021-03-23 17:57:19 -0400
committerZach DeCook <zachdecook@librem.one>2021-03-23 17:57:19 -0400
commit89b9f068e8b8b555ed417c915f4d66d69352da96 (patch)
tree1ec3f3bb7d17a2eb24d9a61d8812b0c0affa43d4 /gcc.sh
parent0922bba03cdb364bbf9322ab6038881826f7894a (diff)
downloadcgi-bin-89b9f068e8b8b555ed417c915f4d66d69352da96.tar.gz
GCC: Clean up output
Diffstat (limited to 'gcc.sh')
-rwxr-xr-xgcc.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc.sh b/gcc.sh
index 6d7e089..47e487a 100755
--- a/gcc.sh
+++ b/gcc.sh
@@ -18,5 +18,10 @@ 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/ | sed 's@<br />@@g' | sed 's@</p>@@' | grep -v '<' | grep -v '!important' | grep -v '}\|{\|wp-smiley' | sed 's/\s\+/ /g' | uniq
+curl https://gccsatx.com/hymns$PATH_INFO/ \
+| sed 's@<p><strong>@##@g' | sed 's@</strong>@@g'\
+| sed 's@<br />@@g' | sed 's@</p>@@' | grep -v '<' \
+| grep -v '!important' | grep -v '}\|{\|wp-smiley' \
+| sed 's/&#8217;/’/g' | sed 's/&#8221;/”/g' | sed 's/&#8220;/“/g'\
+| sed -r '/^\s*$/d'
 exit 0