Skip to content

Instantly share code, notes, and snippets.

@dannguyen
Created February 18, 2014 22:15
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 dannguyen/9081527 to your computer and use it in GitHub Desktop.
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
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