Skip to content

Instantly share code, notes, and snippets.

@maddox
Created February 17, 2011 17:03
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save maddox/832125 to your computer and use it in GitHub Desktop.
Save maddox/832125 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
#
# SHOW ME
# Takes X pictures of you via your iSight, animates them, uploads them to CloudApp, and puts
# the url in your clipboard
#
# This uses a bunch of projects to make the magic happen, mostly thanks
# to Zach Holman: http://github.com/holman
#
#
# required software:
#
# ImageMagick
# CloudApp - http://www.getcloudapp.com/
# cloudapp script: https://github.com/holman/dotfiles/blob/master/bin/cloudapp
# gifme script: https://github.com/holman/dotfiles/blob/master/bin/gifme
#
# Make sure each of those are set up correctly
#
# isightcapture - http://www.intergalactic.de/pages/iSight.html
# download isightcapture and put it in your path
#
# Now you can take X shots from your iSight and push them to the clowd
#
# Ex: $ showme <num>
shots = 1
shots = ARGV[0].to_i if ARGV[0]
puts "Taking #{shots} shots.."
output = []
1.upto(shots) do |shot|
puts "\nPREPARE FOR SHOT #{shot}"
filenm = "/tmp/isightcap-#{shot}.jpg"
`isightcapture #{filenm} > /dev/null`
output << filenm
puts 7.chr
end
files = output.join(' ')
puts `gifme #{files}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment