Skip to content

Instantly share code, notes, and snippets.

@wheatpenny
Last active June 22, 2016 16:33
Show Gist options
  • Save wheatpenny/8669489 to your computer and use it in GitHub Desktop.
Save wheatpenny/8669489 to your computer and use it in GitHub Desktop.
Quick CLI streaming internet radio from BASH.
####
# STREAMING RADIO
####
ojciek() {
PS3='Please enter your choice: '
options=("WNCW" "WNTI" "KRCL" "KUTX" "KCRW: Music" "WBGO" "Quit")
select opt in "${options[@]}"
do
case $opt in
"WBGO")
mplayer -playlist "http://www.wbgo.org/sites/default/files/listennow/wbgo.m3u"
;;
"KCRW: Music")
mplayer -playlist "http://media.kcrw.com/live/kcrwmusic.pls"
;;
"WNCW")
mplayer "http://audio-ice1.ibiblio.org:8000/wncw-128k"
;;
"KUTX")
mplayer -playlist "http://www.publicbroadcasting.net/kut/ppr/kut2.pls"
;;
"KRCL")
mplayer "http://stream.xmission.com/krcl-high"
;;
"WNTI")
mplayer -playlist "http://www.streamlicensing.com/directory/index.cgi/playlist.pls?action=playlist&type=pls&sid=4563&stream_id=8604" -volume 98
;;
"Quit")
break
;;
*) echo invalid option;;
esac
break
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment