Skip to content

Instantly share code, notes, and snippets.

@knoopx
Created June 14, 2012 22:04
Show Gist options
  • Save knoopx/2933250 to your computer and use it in GitHub Desktop.
Save knoopx/2933250 to your computer and use it in GitHub Desktop.
Gitshots Post-Commit Hook
#!/usr/bin/env ruby
# Requires imagesnap from https://github.com/alexwilliamsca/imagesnap (brew install imagesnap)
# To assemble the video use http://www.dayofthenewdan.com/projects/tlassemble
file="~/.gitshots/#{Time.now.to_i}.jpg"
puts "Taking capture into #{file}!"
system "imagesnap -q -w 3 #{file}"
exit 0
@najamkhn
Copy link

For Linux/Ubuntu you can use streamer..

file="~/.gitshots/#{Time.now.to_i}.jpg"
puts "Taking capture into #{file}!"
system "streamer -f jpeg #{file}"
exit 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment