Skip to content

Instantly share code, notes, and snippets.

@waynegraham
Created September 27, 2010 18:45
Show Gist options
  • Save waynegraham/599579 to your computer and use it in GitHub Desktop.
Save waynegraham/599579 to your computer and use it in GitHub Desktop.
#! /usr/bin/env ruby
base_path = "Surveys_Images"
dest_dir = 'footprints'
Dir["#{base_path}/**/*mages/*.pdf"].each do |pdf|
fname = File.basename(pdf, '.pdf')
puts "Converting #{fname}..."
`convert #{pdf.gsub(/ /, '\ ')} #{dest_dir}/#{fname.gsub(/ /, '')}.jpg`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment