linux/shell-funktionen/push_song_information These shell functions get the current played song from different music players, extract their metadate and then create a file from a templat and upload it to a webserver.
For example one with the following content: toggle = left |title = Example file content |titlestyle = background:palegreen; <source lang=“text”> 2012-01-08 07:59 +0100
Processing file “/Music_Free/Rock/The Old Stoic - The Old Stoic – Jamendo - OGG Vorbis q7 - 2010.11.19 [www.jamendo.com]/10 - Sadow And The Moon.ogg”…
New logical stream (#1, serial: 0be44329): type vorbis Vorbis headers parsed for stream 1, information follows… Version: 0 Vendor: AO; aoTuV b5  (based on Xiph.Org's libVorbis) Channels: 2 Rate: 44100
Nominal bitrate: 224,000000 kb/s Upper bitrate not set Lower bitrate not set User comments section follows…
ARTIST=The Old Stoic ALBUM=The Old Stoic TRACKNUMBER=10 JAMENDO-TRACK-ID=684839 TITLE=Sadow And The Moon ORGANIZATION=http://www.jamendo.com COMMENT=http://www.jamendo.com PUBLISHER=http://www.jamendo.com DESCRIPTION=http://www.jamendo.com WWW=http://www.jamendo.com/fr/album/79685 LICENSE=http://creativecommons.org/licenses/by-sa/3.0/ COPYRIGHT=http://creativecommons.org/licenses/by-sa/3.0/ ENCODED-BY=http://creativecommons.org/licenses/by-sa/3.0/ WCOP=http://creativecommons.org/licenses/by-sa/3.0/ COVERURL=http://imgjam.com/albums/s79/79685/covers/1.400.jpg WOAF=http://www.jamendo.com/fr/track/684839 DATE=2010-11-19 REPLAYGAIN_TRACK_PEAK=1.05464709 REPLAYGAIN_TRACK_GAIN=-8.22 dB
Vorbis stream 1:
Total data length: 9273388 bytes Playback length: 5m:41.319s Average bitrate: 217,353522 kb/s
Logical stream 1 ended </source> hidden_end
Sometimes when listening to music someone asks me which music this is. To not need to look the song up, copy the title and paste it to the Mumble client I open a terminal, type m-psi-playername and the person who asked me can look it up on my web page :) One could also bind this functionality to a key shortcut.
One needs to create a file with all needed shell functions and then “source” this file in his shell configuration (for example .bashrc). Then one creates the file
'.psi-settings.conf' in his home directory.
Listing to Clementine Music Player you now only need to run in a terminal: <source lang=“bash”> m-psi-clementine </source>
Each of those functions gets the current played song and then runs the shell function m-psi with the filename as an argument.
An example .psi-settings.conf can be found on GitHub: https://github.com/Natenom/shell-scripts/blob/master/psi/.psi-settings.conf.