Skip to content

Instantly share code, notes, and snippets.

@mateomurphy
Created July 8, 2011 15:24
Show Gist options
  • Save mateomurphy/1072076 to your computer and use it in GitHub Desktop.
Save mateomurphy/1072076 to your computer and use it in GitHub Desktop.
simple mp3 prep script
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