Skip to content

Instantly share code, notes, and snippets.

View tomrod's full-sized avatar

Thomas Roderick tomrod

View GitHub Profile
@tomrod
tomrod / somaFm_function.sh
Last active November 21, 2023 01:25
SomaFM from the command line
function listen_soma() {
local playlist=$1
local -a stations=('defcon' 'lush' 'fluid' 'poptron' 'subursbofgoa' 'beatblender' 'bootliquor' 'illstreet' 'thistle' 'metal' 'covers' 'cliqhop' 'dubstep' '7soul' 'seventies' 'u80s' 'reggae' 'secretagent' 'thetrip' 'sonicuniverse' 'bagel' 'indiepop' 'digitalis' 'folkfwd' 'n5md' 'groovesalad' 'synphaera' 'vaporwaves' 'deepspaceone' 'spacestation' 'dronezone' 'brfm' 'sf1033' 'scanner' 'sfinsf' 'missioncontrol' 'live' 'specials' 'gsclassic')
if [[ " ${stations[*]} " =~ " ${playlist} " ]]; then
mplayer -playlist "http://soma.fm/"${playlist}".pls"
else
echo "station not in stationlist: ${stations[*]}."
fi
}