Fabio, an Italian user of radio.py, wrote to me the other day with couple of suggestions and a huge radio.py configuration file with 150 Italian radio stations.
According to Fabio, the list contains 40 of the most popular Italian radio stations, along with radio station from where he used to live in north Italy.
In his post, Fabio also describes a useful tip he uses. He used the radio.py configuration file to number his favorite stations, thus allowing him even easier way to listen to them. E.g.
Previously, Henrikan compiled a
.radiopy file containing some 58 Swedish radio stations.
If your a radio.py reader and you’ve compiles a
.radiopy file you would like to share, send a link along with short description and I’ll gladly publish it.
Some of the stations in radio.py-0.5 changed the URLs or their streams. The patch updates the stream URLs of three stations: Galgalatz, Galatz and Radius.
To apply the patch and update radio.py, open a terminal and
cd to the directory where you installed it. Type the following commands in the terminal (If you installed as root, you’ll need to run the commands as root too).
$ wget "http://www.guyrutenberg.com/wp-content/uploads/2008/11/radio.py.patch"
$ patch radio.py < radio.py.patch
$ rm radio.py.patch
This new release of
radio.py brings more predefined stations and the much wanted recording feature.
radio.py is a python wrapper for mplayer, designed to provide an easy-to-use interface for listening to radio from the command line. And indeed using radio.py is very easy, just pass the station name.
To read more about radio.py and the existing features go to radio.py – a Wrapper Script for Listening to Radio in Linux.
New stations in this release include Ram FM, Classic FM, Radio Caroline and update to all the radioIO stations. So overall this version of radio.py comes with 81 predefined stations. To see the full list of recognized station run
radio.py --list. If your favorite station is still missing you can add via configuration files, ans described in here. If you will send a comment with the name of the stations and its website, I’ll add it to the next release.
The other important new feature is the ability to record radio streams to mp3 directly from
radio.py. This is done using the
--radio command-line switch. For example the following
radio.py CNN --record cnn.mp3
will record the radio stream of CNN to a file called
cnn.mp3. To stop recording just press ‘q’. This option also be used with the
--wake-up to time your recordings. For example if you want to record a show that start in 30 minutes and is 60 minutes long you should do
radio.py BBC1 --record bbc1.mp3 --wake-up 30 --sleep 60
You can download the new version from here. Installation is pretty straight forward, just untar the archive and put the
radio.py some where in your path (e.g.
/usr/local/bin/) and the package is installed.
As always if you want new stations added to the next release, send a comment with the station details (at least name and website).
UPDATE 14/12/2008: I’ve changed the download link to point to
radio.py‘s SourceForge project page.
Update: radio.py 0.5 is available.
radio.py is a little script that makes it very easy to listen to radio under Linux (and maybe other OSs too) with mplayer. All you need to do is to call radio.py with the name of the station you want to listen to. For example:
radio.py Radio Paradise
To read more about radio.py go to the first post discussing radio.py.
Here are some of the things that have changed in
radio.py-0.4 compared to the previous release (0.3). Continue reading
Update: radio.py-0.4 is now available.
I like listening to music and radio while working, and fortunately there are numerous ways to do that. Unfortunately, most ways that allow you to listen to radio are very resource consuming/memory hogs (such as listening to streaming-media via web-browsers) or very unfriendly to users (listening via mplayer for example). So, I set out to find a way that will use as little system resources as possible while keeping it user-friendly. One other requirement that I had, that I will be able to do all that from the command-line, so it will work great with GNU Screen and won’t require an X server (if I work without one).
I used for some time mplayer for listening to radio. I had a file with a list of web-radio streams URLs which I would copy and pass to
mplayer -playlist. This method answered two of the requirements (minimal resources and command-line interface), but wasn’t really user friendly. So, I wrote a little wrapper script in python around mplayer – radio.py. After quick installation (download and extract the tar archive and copy radio.py to somewhere in you PATH), radio.py will allow you to listen to stations easily, and it will also do couple more things for you.
To listen to a station just call radio.py with the station’s name, e.g. in the command-line enter
radio.py BBC1 to listen for BBC radio channel 1. To view a list of know stations run
radio.py --list. Currently there aren’t many stations (just stations I thought that are needed or I listen to). You can easily edit radio.py to add new stations (the script is documented and very clear). If you do so, please write a comment or email me so I will be able to add those stations to next release by default.
So, as you seen radio.py allows you to easily listen to radio, as easy as writing the station’s name. But, as I said, it can do more things that I thought should be in a radio script. It has both a sleep feature (that turns off the radio after specified amount of time) and a wake-up feature (that starts the radio after a specified amount of time). This two features can be used together, and practically allow you to use radio.py as an alarm clock.
You can find more information about radio.py options by calling
radio.py --help. I hope you will find this script useful as I do.