Skip to content

Instantly share code, notes, and snippets.

@t9md
Created February 17, 2019 15:30
Show Gist options
  • Save t9md/3094964dc150b737e9fb1b0dbd21df79 to your computer and use it in GitHub Desktop.
Save t9md/3094964dc150b737e9fb1b0dbd21df79 to your computer and use it in GitHub Desktop.
def copy_reduced_image(file)
puts "#### #{file}"
File.readlines(file).each do |line|
word = line.split("\t")[0]
cmd = "ffmpeg -y -i slideshow/imgs/#{word}.png -vf 'scale=1334:-1' -q 2 icloud-app/imgs/#{word}.png"
system cmd
# puts cmd
end
end
ARGV.each do |file|
copy_reduced_image file
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment