Basm is discontinued.

I recently discovered this online radio, stereomood1, it seems to have indie music mostly. Most of them are not bad. After I checked up their API documentation1, I decided to write a Bash client.

This client has three Bash scripts:

  • Bash OAuth library
  • stereomood Bash OAuth library
  • The main script

The first two are libraries, they are not complete but enough for to play music. It requires mplayer for main script, OpenSSL and Perl for libraries.

You have to run with two required parameters as follows:

$ ./ -q happy -t mood

or you can specify library path in PATH environment if you put them altogether:

$ PATH=$PATH:/path/to/two_oauth_libs /path/to/ -q happy -t mood

If you run with these two libraries in the same directory, but still couldnt find the libraries, try:

$ PATH=$PATH:$PWD /path/to/ -q happy -t mood only has two parameters and they both are required.

  • -t: Type of the radio, it could be mood, activity, or site.
  • -q: Querying text, e.g. happy for mood, relax for activity.

You probably need to check up on stereomood, so you can know what querying text you can use.

You must have to have an account on stereomood, thats the requirement for using APIs. In your first run of the script, you have to authorize the script, just follow the link and enter the PIN code.

The songs will be played randomly, there is no like button or ban button for you yet2. Its a little different than on stereomood.

There are few keys you can use:

  • P - Pause
  • A - Add to library
  • N - Next song
  • Q - Quit

Here is a screenshot:

The last line from screenshot actually is the output of mplayer.

[1](1, 2) and are gone.
[2]A developer from stereomood told me the corresponding APIs would be released in September or October.