Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

James Robertson http://www.r0bertson.co.uk

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

A Ruby script for MPD

Install MPD along with phpMp and control your music media centre from a Ruby script.

   1  
   2  #!/usr/bin/ruby
   3  #file: mp_control.rb
   4  
   5  require 'open-uri'
   6  cmd = ARGV[0]
   7      open("http://192.168.1.107/phpMp/playlist.php?hide=1&command=#{cmd}", 'User-Agent' => 'Ruby-MPClient').read
   8  


Example: mp_control.rb play
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS