19 lines
302 B
Ruby
Executable File
19 lines
302 B
Ruby
Executable File
#!/usr/bin/env ruby
|
|
|
|
if ARGV.empty?
|
|
files = Dir["*.wav"].sort
|
|
else
|
|
files = ARGV
|
|
end
|
|
|
|
files.each do |infile|
|
|
outfile = infile.sub(".wav", ".mp3")
|
|
|
|
puts "Converting: #{infile} -> #{outfile}"
|
|
|
|
command = %W[lame -v -b 256 #{infile} #{outfile}]
|
|
system(*command)
|
|
end
|
|
|
|
puts "Conversion complete!"
|