Skip to content

Instantly share code, notes, and snippets.

@mrtazz
Created May 5, 2010 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrtazz/390723 to your computer and use it in GitHub Desktop.
Save mrtazz/390723 to your computer and use it in GitHub Desktop.
IMAGES = FileList["**/*.eps"]
desc "convert eps to pdf"
task :epsconvert do
IMAGES.each do |i|
dir = File.dirname(i)
file = File.basename(i, ".eps")
pdffile = dir+"/"+file+".pdf"
pdffile.gsub!(/ /, '\\\\ ')
i.gsub!(/ /, '\\\\ ')
if not File.exists?(pdffile)
sh %{#{PSCMD} -dEPSCrop #{i} #{pdffile}}
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment