/ Published in: Ruby

Gets an mp3 player to play mp3s which contain all the phrases given as arguments. Locate is much faster than xmms' library, usually in split a second.
This is very handy, when you install a command-line into the wm panel.
Creates files /locate.0, /locate.1, /locate.tmp.m3u.
Not reentrant.
This is very handy, when you install a command-line into the wm panel.
Creates files /locate.0, /locate.1, /locate.tmp.m3u.
Not reentrant.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
system('locate -i '+ARGV[0]+' >/locate.0'); iter="" no=0 ARGV.each { |iter| system('grep -i </locate.'+no.to_s+' '+iter+' >/locate.'+(1-no).to_s); no=1-no } system('grep </locate.'+no.to_s+' .mp3$ >/locate.tmp.m3u'); # system('dcop amarok playlist addMedia /locate.tmp.m3u'); system('xmms /locate.tmp.m3u');
Comments
