git + webcam = lol

Takes a snapshot with your Mac's built-in iSight/FaceTime webcam (or any working webcam on Linux) every time you git commit code, and archives a lolcat style image with it.

By default, the lolimages are stored by a Github style short SHA in a ~/.naturecommits directory created for you.

This is a fork of lolcommits with Amazon S3 support added.

Installation (Mac OS X)

You'll need ImageMagick installed. Homebrew makes this easy. Simply do:

brew install imagemagick --from-source

Then simply do:

[sudo] gem install naturecommits

(If you're using rvm or something like that, you can/should probably omit the sudo, but the default MacOSX Ruby install is dumb and requires it.)

You're all set! To enable naturecommits for a git repo, go to the base directory of the repository, and run:

naturecommits --enable

Likewise, you can disable it via naturecommits --disable. For a full list of options, you can do naturecommits --help.

Installation (Linux and Windows)

I have only tested this on Mac, for Windows and Linux instructions please see the original lolcommits

Please Note

I have updated it to work with European bucket locations, this will no longer work with US Buckets. If you want to use US buckets then fork this and remove the line AWS::S3::DEFAULT_HOST.replace "s3-eu-west-1.amazonaws.com" from /lib/naturecommits.rb and install locally.

Configuration

For Amazon S3 to work you will need a yaml config file in your root called naturecommits.yaml, this sets up your connection to Amazon S3 account. This should be in the format shown below with your amazon access keys, a username (no spaces), and the name of the bucket where the images are to be stored.

---
amazon:
  access_key: ACCESS_KEY_HERE
  secret_key: SECRET_KEY_HERE
user: jbloggs
bucket: naturecommits

Options

naturecommits has some options for additional lulz. You can enable via environment variables.

  • TRANZLATE YOAR COMMIT_MSG TO LOLSPEKK - set naturecommits_TRANZLATE=1.