I use XMMS for playing all my mp3s and oggs; and I like it to have the currently played song appended to my email signature.
For this purpose I have 2 files:
One template file with the signature text to which the song title is appended
A script, which appends the song title to the template and saves it as the final signature file
And the resulting file is set as signature in thunderbird
Now all I did was to use the songchange
plugin in XMMS to call the
mailsignature_song.sh
script every time a new
title is played.
I use icecast in connection with XMMS to broadcast the currently played song over the network to have control about what is played at the computer with the sound system at work...
One doesn't need to do this, but it is a nice feature to see the song title and author in the remote player. Once again I used the songchange plugin for XMMS to write title and author into a file
Example 2.9. /home/cweiske/scripts/xmms_icecast.pl
#!/usr/bin/perl @trackinfo=split(/ - /, $ARGV[0]); system("echo \"TITLE=$trackinfo[1]\" > /home/cweiske/trackinfo.txt"); system("echo \"ARTIST=$trackinfo[0]\" >> /home/cweiske/trackinfo.txt"); system("killall -USR1 ices");
I didn't write this script; it is from the icecast website.
Now there are 2 scripts which are to be called by the songchange plugin, and as this can call only one script, there is a third one to call those two (nice sentence, isn't it?)