(no title)
michaelbryzek | 2 months ago
#!/usr/bin/env ruby
def run(extension)
files = `find . -type f -name "\*.# {extension}"`.split("\n")
files.each do |f|
jpg = f.sub(/\.#{extension}/i, '.jpg')
if !File.exist?(jpg)
cmd = "sips -s format jpeg '#{f}' --out '#{jpg}'"
`#{cmd}`
puts cmd
end
end
end
run("HEIC")
run("heic")
nine_k|2 months ago