-
-
Save schacon/832317 to your computer and use it in GitHub Desktop.
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 | |
# | |
# 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 | |
shots = ARGV[0].to_i | |
exit if !shots | |
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 | |
end | |
files = output.join(' ') | |
puts files | |
puts `gifme #{files}` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment