LastBASH

LastBASH

Infobox Software
name = LastBASH


caption = Screenshot of a sample LastBASH session on Gentoo Linux
developer = Costin Stroie
latest_release_version = 0.3.2
latest_release_date = 23 March 2007
operating_system = Cross-platform
programming language = Bash
genre = Internet radio
license = GNU General Public License
website = [http://lastbash.sourceforge.net/ LastBASH website]

LastBASH is a console/terminal based player for Last.fm written in Bash.

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.LastBASH tries to find its place among the other Last.fm players, filling this g

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 an HTML file containing the track information and album cover.

To listen to Last.fm, you can use any player capable of mp3 streaming (such as MPlayer, mpg123, XMMS and so on) by opening the M3U playlist that LastBASH saves on connecting.But the recommended way is to use the LastBASH frontend features and let it run some compatible player in background (MPlayer or mpg123).You can control the player through the same user interface.This way you need to have only one console open for both listening and controlling Last.fm.

Features

LastBASH features the following:

* nice and usable Text User Interface
* authentication using the md5 password encryption
* retrieves the metadata of the current playing track and displays it (artist, album, track name, track duration)
* keeps a history of last played tracks
* allows you to control the Last.fm station, by issuing the "love", "skip" and "ban" commands
* allows you to change the Last.fm station based on "tags", "group", "neighbours", "recommendations", "similar artists", "fans" or by directly typing the full URL
* optionally, it can run a backend player (such as MPlayer or mpg123), which you can control through the same interface, or lets you choose any external player you wish (capable of playing mp3 streams), such as XMMS, Rhythmbox or even Amarok, if you feel to
* remote control (send commands and station changing)
* creates an HTML file displaying the current track information
* easy integration with web browsers

Internal stuff

The communication with the web service is accomplished using external HTTP clients (wget or cURL) or using the built-in client.

The TUI is created using some terminal features such as non-linear cursor movement, scrolling areas and color attributes, so you need a compatible terminal (Linux, Xterm, Rxvt, GNU Screen are tested and they work). Starting with version 0.3.0, the program uses tput instead of plain escape sequences.

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 before using it.

Basic usage

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 you don't want to use the backend, 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

Remote control

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

lastbash -c LOVElastbash -c SKIPlastbash -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 [http://www.last.fm 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.

Key bindings

Basic key bindings are the following.

See also

*Last.fm
*MPlayer
*Bash

External links

* [http://lastbash.sourceforge.net LastBASH main page]
* [http://www.last.fm/ Last.fm main page]
* [http://blis.sourceforge.net Blis main page (the web engine)]


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Last.fm — Infobox Website name = Last.fm favicon = caption = url = [http://www.last.fm/ www.last.fm] commercial = Yes type = Music, Statistics Community registration = Free, or subscribe for £1.50 per month ($3 USD) owner = CBS Interactive language =… …   Wikipedia

  • Список систем потокового мультимедиа — Ниже представлен список систем потокового мультимедиа с ссылками на соответствующие статьи: Содержание 1 Серверы 2 P2P и мультикастинг 3 Software as a service …   Википедия

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”