lastbash(1)

lastbash(1) Multimedia lastbash(1)

NAME

lastbash - Console player for Last.fm

SYNOPSIS

lastbash [-aAdvh] [-g HTTP_client] [-p player] [-r refresh_interval] [-u username] [-c command] [station]

DESCRIPTION

LastBASH is a console/terminal based Last.fm player. Although the default Last.fm player is a great one, it also is a graphical one and it could be somewhat inadequate for the die-hard terminal users, like some people I know. LastBASH tries to find its place among the other Last.fm players, filling this gap: the missing console player.

Basically, it is no more than a TUI frontend, written in Bash. It displays the information of the current playing track, keeps a history of the played tracks and allows the user to select the desired station and to perform some actions on the current track, such as love, skip or ban. It can also create a html file containing the track information and album cover.

OPTIONS

-a
Do not start playing automatically.
-A
Start playing automatically.
-d
Enable debug mode (will create a log file at ~/.lastbash/lastbash.debug).
-g HTTP_client
Set the HTTP client to use for the webservice. Use '-g help' for a list of supported HTTP clients.
-p player
Set the backend player to use. Use '-p help' for a list of supported players.
-r refresh_interval
Set the refresh interval, in seconds. Minimum value allowed is 30.
-u username
Set Last.fm username and re-request the password.
-c command
Send command to the first instance. See Remote control below.
-v
Show program name and version.
-h
Show a quick help.
station
Specify the Last.fm station to connect to when starting or to send to the first instance. See Remote control below.

BASIC USAGE

After you have donwloaded, extracted and installed the program, run it. You do not need to pass any command line parameters, at least at first start.

$ lastbash

It will ask your Last.fm username and password. You should have one. If not, hmmm... go and create an account on Last.fm.

You can also pass the Last.fm station name to tune directly into it.

$ lastbash "lastfm://globaltags/rock"
$ lastbash "lastfm://globaltags/classic rock"
$ lastbash "lastfm://user/cstroie/neighbours"
$ lastbash "lastfm://artist/Rammstein/similarartists"

Then, the program will try to connect. If it succeeds, it will save a playlist in ~/.lastbash/playlist.m3u, for you to open with some external player, if you don't want to use the backend it provides.

If you have MPlayer (for the moment, this is the backend), it will start playing automatically. If not, you will have to tell LastBASH not to try to run it by setting this in the configuration file:

USE_PLAYER="n"

Then, open your favourite mp3 player, load the above-mentioned playlist and start playing. LastBASH will show you the current playing track, will keep a history of last played tracks and will allow you to control the stream.

For example, to run MPlayer manually (just an example), run it this way:

$ mplayer -cache 512 -playlist ~/.lastbash/playlist.m3u

If you like xmms, run it this way (or just run it and open the playlist):

$ xmms ~/.lastbash/playlist.m3u

To use mpg123, the command is the following:

$ mpg123 -C -v -@ ~/.lastbash/playlist.m3u

KEY BINDINGS

Basic key bindings are the following:

l
Love track
k
Skip track
b
Ban track
r
Refresh track metadata (refresh is automatic, but if you need to, you can use this key to force a refresh)
p
Toggle "Record to Profile" (the P led will change status)
d
Toggle "Discovery mode" (the D led will change status)
u
Enter new last.fm URL.
t
Listen to global tags station. You are asked the tags.
g
Listen to some group's station. You are asked the group name.
n
Listen to the neighbours's station. You are asked the username.
c
Listen to the recommended station. You are asked the username.
a
Listen to the similar artists station. You are asked the artists names.
f
Listen to the artist's fan station. You are asked the artist's name.
^S
Toggle history scrolling direction
^L
Redraw the interface
^D
Toggle debug mode
q
Quit (and stop the backend player too)

REMOTE CONTROL

If one instance of LastBASH is already running, a second call can send commands to the first one, for example:

$ lastbash -c LOVE
$ lastbash -c SKIP
$ lastbash -c BAN

Or you can change the station this way.

$ lastbash "lastfm://group/LastBASH"

MOZILLA FIREFOX INTEGRATION

Open Firefox and type in the address bar the following.

about:config

Right click and select New > String. For name type the next string and press OK.

network.protocol-handler.app.lastfm

For value type the full path to the LastBASH program, something like this one.

/usr/bin/lastbash

Now, go to Last.fm and click any lastfm:// url. This will launch a second instance of the program, which will connect to the first one and will pass it the new station name.

LAST.FM

This is shameless self-promotion, I know. You can find me on Last.fm as cstroie and, if you like this player and want to share your experience, you can join the LastBASH group and tell others about it.

FILES

~/.lastbash/config, /etc/lastbash.config
Configuration files

LICENSE

GNU General Public License

AUTHORS

Costin Stroie <cstroie@users.sourceforge.net>

SEE ALSO

LastBASH website at: <http://lastbash.sourceforge.net>
Author's profile at Last.fm: <http://www.last.fm/user/cstroie>
LastBASH group at Last.fm: <http://www.last.fm/group/LastBASH>

23 Mar 2007 LastBASH