Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Sunday, January 23, 2005

Here's a Ruby script that I'm going to use to slap on start and end music for my podcasts:

Dir.foreach("../X30 Storage Card") {|filename|
if filename =~ /Podcast.*\.mp3/
File.stat("..\\X30 Storage Card\\#{filename}").mtime.to_s =~ /\w+ (\w+) (\d+) (\d+):(\d+):\d+.* (\d+)/
puts `copy PodcastStart.mp3 /b + "..\\X30 Storage Card\\#{filename}" /b + PodcastEnd.mp3 /b "..\\Podcasts\\#{$2}-#{$1}-#{$5} #{$3}-#{$4}.mp3"`
end
}

0 Comments:

Post a Comment

<< Home