CLI script to listen to internet radio
- Run on GNU/Linux platform. Not really tested on other platforms.
- Install
mplayer: Connects to radio URL and plays the audio stream. Useapt install mplayerto install. - Install
dialog: This allows you to select from a list the stations. Useapt install dialogto install. - Install
cmatrix: This will make a nifty visualization in your terminal while playing. Useapt install cmatrixto install. - PHP is required to run the streamwatch component.
Once you clone this repository, symlink the file listenr into your $PATH.
There is a file called stations.conf.example. Copy this file to
stations.conf. You can add your own favorite internet radio stations to this
file to easily select them and listen to them with listenr.
Here is the format for the stations, four pieces of data per line with pipes | in between.
station_id|station_name|url|color
station_idis an id you make up to refer to the station (no spaces)station_nameis a name or description you can give to find the station in the listurlis the URL to the internet streamcoloris a color to use for the matrix visualization. Valid colors are green, red, blue, white, yellow, cyan, magenta and black.
Example stations.conf file:
mpr-classical|MPR - Classical|http://classicalstream1.publicradio.org:80/|blue
current|The Current|http://currentstream1.publicradio.org:80/|blue
weather|Weather Radio - 55420|http://audioplayer.wunderground.com/tim273/edina|cyan
Run listenr --help to find help on using this program.
Run listenr without any arguments to choose from your list of configured stations and start playing it.
Use Control-C to exit the program after starting.
Usage: listenr [-d] [-n] [--list] [station]
-d Debug mode (bypass the streamwatch pipe)
-n No matrix animation (cmatrix)
--list List available stations from config file
Available stations are configured in stations.conf file (/path/to/file/stations.conf).
mplayer output is piped to streamwatch (included with listenr program)
to display desktop notifications of stream song changes.
Without a station argument a dialog will present list for selecting a station.
Example: listenr -d weather