Created
July 8, 2011 15:24
-
-
Save mateomurphy/1072076 to your computer and use it in GitHub Desktop.
simple mp3 prep script
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
task :rename do | |
Dir.glob('*.mp3') do |file| | |
new_name = file.gsub(" ", '_').gsub(/'/, '') | |
File.rename(file, new_name) | |
puts new_name | |
end | |
end | |
task :transcode do | |
Dir.glob('*.mp3') do |file| | |
command = "lame --mp3input \"#{file}\" \"../#{file}\"" | |
`#{command}` | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment