Created
May 5, 2010 12:49
-
-
Save mrtazz/390723 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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