Last active
August 29, 2015 14:04
-
-
Save gugat/39c09bc518f034ab90eb to your computer and use it in GitHub Desktop.
Take song name from file and play it with mplayer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
a = IO.readlines("/home/guga/Music/playlist_regueton").each do |line| | |
if !line.strip.empty? | |
cmd = `find '/media/guga/Mi disco/' -name #{line.strip}*` | |
puts cmd | |
`mplayer "#{cmd.strip}"` | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for line in $(cat /home/guga/Music/playlist_regueton2); do find /media/guga/Mi\ disco -name $line* -exec mplayer {} \; ; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Convert .wav to .mp3 with FFMPEG command line tool | |
# | |
Dir.glob("/home/guga/Music/*.wav").each do |musica| | |
`ffmpeg -i "#{musica}" -f mp2 "/home/guga/Music/#{File.basename(musica).gsub('.wav','')}.mp3" ` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment