Skip to content

Instantly share code, notes, and snippets.

@andrewmacquarrie
Created February 16, 2015 19:23
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 andrewmacquarrie/9fcef30fb4d89327a6b2 to your computer and use it in GitHub Desktop.
Save andrewmacquarrie/9fcef30fb4d89327a6b2 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'fileutils'
FileUtils.cd("/Users/drew/Desktop/ladder") do
prev_num = -1;
i = 0;
Dir['*.png'].each do |filename|
number = /ladybug_panoramic_(\d{6}).png/.match(filename)[1]
num_i = number.to_i
puts "frame #{num_i-1} missing" if num_i != prev_num + 1
prev_num = num_i
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment