A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal
5
ext="$2"6
url=$(psql verbal -c "select icon from station where id = $id;" -t | xargs echo -n)7
curl -sL "$url" -o "logo.$ext"8
color=$(echo $(convert "logo.$ext" -colors 1 -unique-colors txt:) | awk '{print $8}')8
color=$(echo $(convert "logo.$ext" -colors 1 -unique-colors txt:) | awk '{print substr($8, 0, 7)}')9
echo "$color"10
psql verbal -c "update station set color = '$color' where id = $id;"11
rm "logo.$ext"