Skip to content

Instantly share code, notes, and snippets.

Drew MacQu andrewmacquarrie

View GitHub Profile
View fill_dropped_frames.rb
#!/usr/bin/env ruby
require 'fileutils'
# Takes two arguments:
# Arg 1 - path to the "GRP/frame information" txt file, output by LadybugCapPro
# Arg 2 - path to the folder containing all the fames as PNG files. Assumes prefix 'ladybug_panoramic_'
path_to_frame_info_file = ARGV[0]
path_to_png_folder = ARGV[1]
View find_missing_frames.rb
#!/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
You can’t perform that action at this time.