Listen to online radio in text mode: only for SQL hard-core users

The ultimate way to listen to online radio in text mode has just been improved. If that makes sense. Hello. Today is Thu 23 Jan 2020 02:32:15 PM UTC.

Instead of csvsql, I am using SQLite3 now. So go get it, install it. It is in the Debian repositories. Querying a 35,000+-row database with SQLite3 is unbelievably faster than with csvsql. What was sometimes even a several-second ordeal is now a bat-of-an-eye breeze.

I removed the select function. Now you have to use the play command with the id number. I also removed a silly repetition/redundancy there was in the previous version. VLC was invoked muted in the background twice… when the user entered the play command, once to (slowly) update de csv database, the second time to decide if playing the stream or not. So a third time VLC could be invoked, to play the stream if it was active. How like, duh!, of me, right?

Download this tarball, make listen executable, and copy listen and listen.db to ~/bin. Invoke it with listen from the command line. Put the files in just any other directory, but make the changes accordingly. There is also a BASH function to provide for some autocompletion, just copy the contents of it to ~/.bashrc then source it, for example like so: source ~/.bashrc.

Other than that, the behavior of the script is pretty much the same. It works way, way faster, but it behaves kind of the same. You can invoke it with one or no argument. If with one argument, the argument hast to be a short name for the radio station. If the user does not provide an argument, a prompt appears. Type sql, then type a valid SQL query. A list of radio stations will be displayed, with less -F. Press q to exit less if necessary, then type play {id}. Enjoy. You’re welcome.

This is my fourth attempt at providing a comfortable experience to listen to radio streams using the command line. Some years ago, I did a naive interface using, sigh, dialog. Then I used a BASH script that combined csvsql non-interactively. Upon that I built the interactive interface I presented here at RTC some days ago. Use it, enjoy it, distribute it. Thanks to for providing this html space. Be excellent to each other. E-mail yours truly at