Created
July 1, 2012 04:43
-
-
Save gdiggs/3026848 to your computer and use it in GitHub Desktop.
ruby timelapse script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Before running this, do `brew install imagesnap` | |
# | |
# Takes a photo every 30 seconds and saves it. Good for doing timelapses! | |
while true do | |
file = "~/snaps/#{Time.now.to_i}.jpg" | |
puts "Taking photo at #{Time.now}" | |
system "imagesnap -q -w 3 #{file}" | |
puts "waiting 30 seconds..." | |
sleep 30 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment