The closest combination I can find is by using Geektool. There's a posted geeklet for Now Playing on VLC to be used with Geektool but it no longer work when I tried it. It seems the xml posted by vlc web interface has changed since the posting of that Geeklet.
I end up playing around with the new vlc's xml myself using XMLStarlet to get the value I want. It's a great command line tool for handling xml. Here's the command that I then feed to Geektool (using shell Geeklet) :
cd /Users/Hafiz;curl -o vlcstatus.xml -s http://localhost:8080/requests/status.xml;./bin/xml sel -t -v "/root/information/category[@name='meta']/info[@name='title' or @name='artist' or @name='album']" vlcstatus.xml
What it does is dump the xml to the file using curl, and then XMLStarlet parse and display the relevant part (artist, album, title). When the above command put in shell Geeklet, Geektool will then display it on the desktop.
Here's how it displayed on the lower-right corner of my screen.
Hi
ReplyDeleteand great work but
the VLC now playing link doesn't work because i doesn't exist anymore.
Could you please put a link of "vlcstatuts.xml"?
thks
Hi,
ReplyDeleteHave you run vlc web interface (VLC->Add Interface->Web)?. the script will not work otherwise.
regards