Interactive Dev in Portland, OR

This is a script that grabs a timestamped image from your MacBook webcam every 180 seconds:

day=`date "+%Y-%m-%d"`
mkdir $dest_dir
while [ 1 ] 
    timestamp=`date "+%Y-%m-%d_%H@%M-%S"`
    isightcapture "$dest_dir/$timestamp.jpg"
    sleep 180

You’ll need to download isightcapture and drop it in your ~/bin directory.

If you want to convert the resulting directoryful of JPEGs into an animated gif, and you have ImageMagick installed, you can use the following invocation to do it:

  convert -geometry 120x -delay 1x4 -loop 0 *.jpg animated.gif

EDIT: If you prefer the Fish shell, here’s the script in that syntax:

set day (date "+%Y-%m-%d")
set dest_dir "$HOME/Desktop/look-at-you-hacker-$day"
mkdir $dest_dir
while true
    set timestamp (date "+%Y-%m-%d_%H@%M-%S.jpg")
    isightcapture "$dest_dir/$timestamp"
  sleep 180