Fixes for sing.sh

This commit is contained in:
Storm Dragon 2016-09-09 22:29:41 -04:00
parent ff61af4983
commit 3906a98a3f
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#enter channels here in quotes before the ) #enter channels here in quotes before the )
channel=( channel=(
"a11y" "talkingarch"
) )
# The date format for log entries. man date for details. # The date format for log entries. man date for details.
dateFormat='%B %d, %I:%m%P' dateFormat='%B %d, %I:%m%P'

View File

@ -7,7 +7,7 @@ shift
#get the lyric text into a variable #get the lyric text into a variable
trackName="${@//:/ - }" trackName="${@//:/ - }"
# Try to work around some common tags that will fail to find lyrics. # Try to work around some common tags that will fail to find lyrics.
trackName="${trackName/ - live/}" trackName="${trackName//\//_}"
curl="$(command -v curl)" curl="$(command -v curl)"
trackName="$(echo "$trackName" | sed -e "s/ /_/g" -e 's/([[:print:]]*)//g' -e "s/['\/\.]//g" -e 's/&/and/g' -e 's/ö/o/g')" trackName="$(echo "$trackName" | sed -e "s/ /_/g" -e 's/([[:print:]]*)//g' -e "s/['\/\.]//g" -e 's/&/and/g' -e 's/ö/o/g')"
artist="$(echo "${trackName,,}" | cut -d "-" -f 1 | sed -e 's/_$//' -e 's/^the_\(.*\)/\1_the/')" artist="$(echo "${trackName,,}" | cut -d "-" -f 1 | sed -e 's/_$//' -e 's/^the_\(.*\)/\1_the/')"