Created
February 18, 2014 22:15
-
-
Save dannguyen/9081527 to your computer and use it in GitHub Desktop.
Ruby invoking graphicsmagick to make images blue because I'm too lazy to learn shell loops
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
Sector.all.each do |sector| | |
files = Dir.glob("./**/skift/#{sector.slug}.png").reject{|f| f =~ /-blue\.\w{3,4}$/} | |
files.each do |fname| | |
cmd = "convert #{fname} -fill '#2b74a5' +opaque darkblue #{fname}" | |
puts cmd | |
`#{cmd}` | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment