Little shell script that streams internet radio stations I like.
This requires a Unix-like system.
git(to get the code)
mpv(to play the stream)
whiptail(to do the dialog box)
On Ubuntu, this will install what you need (
whiptail is built in):
sudo apt install git mpv
On Mac OS X, run this to get
brew install newt
It will even work on Android, with Termux. Open a shell, then run:
pkg install git dialog mpv
This command will download all the files without requiring a GitHub account:
git clone https://github.com/wdenton/whipradio.git
Run the script on its own:
cd whipradio ./whipradio
Not a bug, but a needed code improvement. The script defines an associative array in a Bash script, where the keys are the station names and the values are the stream URLs. I can’t figure out how to pass the station names to
whiptail to make them appear in the menu list, so I have to hard-code them. This means duplication, which I’d like to get rid of. Suggestions welcome.