scripts for my gemini capsule
GCC: Clean up output
Zach DeCook 2021-03-23
parent 0922bba · commit 89b9f06
-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