Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment