Skip to content

Instantly share code, notes, and snippets.

@cburmeister
Last active December 17, 2015 19:29
Show Gist options
  • Save cburmeister/5660468 to your computer and use it in GitHub Desktop.
Save cburmeister/5660468 to your computer and use it in GitHub Desktop.
Simple git hook that snaps a photo every time a commit is made with http://iharder.sourceforge.net/current/macosx/imagesnap/
#!/usr/bin/env python
import os
import datetime
my_dir = os.path.expanduser('~/commit-captures')
if not os.path.exists(my_dir):
os.makedirs(my_dir)
filename = '%s/%s.jpeg' % (my_dir, datetime.datetime.now())
filename = filename.replace(' ', '_')
os.system('imagesnap -q %s &' % filename)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment