NAME

playomatic


SYNOPSIS

playomatic [command [message]]


DESCRIPTION

Run without arguments, plays the last.fm (http://www.last.fm/) radio station. You'll need to register for an audioscrobbler account first (http://www.audioscrobbler.com). Your username and password are read from the configuration file.

Run with arguments, issues the supplied command to the running playomatic - see COMMANDS, below.

Before first use, you should create the configuration file ~/.playomaticrc containing your last.fm username and password - see the CONFIGURATION FILE section (below) for details.


CONTROLS

For ease of use (yes, really*), you control playomatic by touching various files in your home directory. The files and their effects are as follows:

.playomaticskip
Skips the current track.

.playomatic.love
Sends the 'love' command.

.playomatic.ban
Sends the 'ban' command, and skips this track.

.playomatic.station
Switches stations. The first line of the file must contain ``station [mode]'' where mode can be ``personal'' or ``profile'' (the default), and station is the name of station you want to change to.

.playomatic.newsession
Starts a new session (switches last.fm radio stations, randomly).

.playomatic.update
Forces the track name and title to be updated. Useful if you have skipped track by some other means, such as the last.fm web control panel.

.dump
Dumps status information.

These commands can also be sent from the command line - see the following section for details.


COMMANDS

Any of the commmands below may be supplied (instead of touching the approriate file into existence):

skip
Skips a track

love [message]
Sends the love command to the lastfm server, and marks the file in the logs with '[**]'. If message is supplied, it will be logged to the log file. If message starts with an exclamation mark the message will be logged with '[*]' but the love command will not be sent to the server.

ban
Skips the track and sends the ban command to the lastfm server.

update
Updates the track information

station station [mode]
Changes stations - see .playomatic.station above for details.

restart
Restarts playomatic

log
Analyses the playomatic log and produces some basic statistics (currently merely the number of tracks listened to per artist).

dump
Dumps status information (useful primarily for debugging)


ENVIRONMENT

AS_SESSION
If the environment variable AS_SESSION exists, its value will be used as the session key, instead of a new session's being created. This allows you to connect playomatic to a session that you have initiated from last.fm's web interface, for example.


FILES

~/.playomatic.current
Contains details of the track currently being played.

~/.playomaticrc
The configuration file ~/.playomaticrc should contain a series of key/value pairs separated by '=', one per line. The following are known to be useful (and perusers of the source may discern yet others if/when the documentation starts to lag the code):
 username    = [audioscrobbler username]
 password    = [audioscrobbler password] 
 mpg123_args = [additional arguments to pass to mpg123, 
                separated by spaces]


*

If you can't work out why these make playomatic easy to use, you should probably be using a different last.fm player. (But see also COMMANDS before giving up entirely.)


AUTHORS

Chris Lightfoot (chris@ex-parrot.com) and Julian T. J. Midgley (jtjm@xenoclast.org)


BUGS

Probably present in profuse quantity - please email details to: jtjm@xenoclast.org