📷 git-based selfies for software developers
Ruby Cucumber
Permalink
Failed to load latest commit information.
bin fixing cukes, methadone options and runner behaviour, README updated Dec 20, 2016
config feature for Windows post commit path, tidying up fake platform code Apr 23, 2015
features fixing cukes, methadone options and runner behaviour, README updated Dec 20, 2016
lib 0.9.2 version released Jan 4, 2017
test adding logging methods to tests Dec 14, 2016
vendor fixing CommandCam perms (for cygwin) Mar 30, 2014
.coveralls.yml Setup Coveralls.io integration Dec 3, 2013
.editorconfig add editorconfig and gitattributes to add contributions Feb 10, 2014
.gitattributes add editorconfig and gitattributes to add contributions Feb 10, 2014
.gitignore adding vendor/bundle to gitignore Sep 10, 2014
.rubocop.yml use modern hash syntax (since 1.8 was dropped a while ago) Dec 11, 2016
.rubocop_todo.yml fixing cukes, methadone options and runner behaviour, README updated Dec 20, 2016
.travis.yml remove problematic twitter gem, use oauth/rest-client directly Jan 3, 2017
CHANGELOG.md minor update to CHANGElog Jan 4, 2017
CODE_OF_CONDUCT.md adding Code of Conduct Jun 1, 2016
CONTRIBUTING.md Adjusting clone URL in CONTRIB guide Mar 10, 2016
Gemfile Mitigates Style/StringLiterals Apr 12, 2015
LICENSE add license information, closes #44 May 18, 2012
README.md fixing cukes, methadone options and runner behaviour, README updated Dec 20, 2016
Rakefile use modern hash syntax (since 1.8 was dropped a while ago) Dec 11, 2016
appveyor.yml Removes unsupported ruby versions Jun 29, 2015
lolcommits.gemspec updating methadone (now Ruby 2.4 compatible) Jan 3, 2017

README.md

lolcommits (git + webcam = lol)

lolcommits takes a snapshot with your webcam every time you git commit code, and archives a lolcat style image with it. Git blame has never been so much fun.

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

Gem Version Build Status Dependency Status CodeClimate Status Coverage Status

Sample images

Please add your own lolcommit! Add to the People Using Lolcommits page on our wiki.

Requirements

Installation

Mac OS X

You'll need ImageMagick installed. Homebrew makes this easy.

brew install imagemagick

Then install the gem with:

[sudo] gem install lolcommits

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

If Boxen is your thing, try this.

Lolcommits v0.8.1 was the last release to support Ruby < 2.0. If you'd like to use this gem on older rubies try:

[sudo] gem install lolcommits --version 0.8.1   # for Ruby 1.9
[sudo] gem install lolcommits --version 0.7.0   # for Ruby 1.8

Linux

Install dependencies using your package manager of choice, for example in Ubuntu:

sudo apt-get install mplayer imagemagick libmagickwand-dev

For Ubuntu 14.04 or newer, you need to manually install ffmpeg since it no longer ships with the default Ubuntu sources. Downloads for ffmpeg

Then install the gem with:

gem install lolcommits

For more details, see Installing on Linux.

Windows - here be dragons!

It works, but you'll need some more detailed instructions to get the dependencies installed. See the wiki page for Installing on Windows.

Usage

Enabling and basic usage

From within any git repository, simply do a lolcommits --enable. From that point on, any git commit will automatically trigger a lolcommit capture! All lolcommits are stored in ~/.lolcommits by default, placed in a subdirectory by project name, and with a filename matching the commit hash.

You can also enable lolcommits across all your local git repos. Follow these steps to achieve this using git init and the init.templatedir setting.

Don't worry about it too much, half the fun of lolcommits is forgetting it's installed!

Other commands

Ok, if you insist... Since you know about --enable, common sense suggests there is also a repository specific --disable, hopefully you can guess what that does.

Other handy common commands include --last, which will open for display your most recent lolcommit, or --browse, which pops open the directory containing all the lolcommit images for your current repository. You can always do --help for a full list of available commands.

NOTE: Any extra arguments you pass with --enable are appended to the git post-hook capture command. For example;

lolcommits --enable --delay 5 --animate 4 --fork

Will configure capturing of an animated gif (4 secs) after a 5 sec delay in a forked process. See the section below for more capture configuration variables.

Capture configuration variables

lolcommits has some capture options for additional lulz. You can enable these via environment variables like so;

  • LOLCOMMITS_DEVICE set a webcam device - mac and linux only
  • LOLCOMMITS_ANIMATE (in seconds) set time for capturing an animated gif - requires ffmpeg
  • LOLCOMMITS_DELAY (in seconds) set delay persistently (for slow webcams to warmup)
  • LOLCOMMITS_FORK fork lolcommit runner (capture command forks to a new process, speedily returning you to your terminal)
  • LOLCOMMITS_STEALTH disable notification messages at commit time
  • LOLCOMMITS_DIR set the output directory used for all repositories (defaults to ~/.lolcommits)

Or they can be set with these arguments to the capture command (located in your repository's .git/hooks/post-commit file).

  • --device {name} or -d {name}
  • --animate {seconds} or -a {seconds}
  • --delay {seconds} or -w {seconds}
  • --fork
  • --stealth

Use lolcommits --devices to list all attached video devices available for capturing.

You can configure lolcommit text positions, font styles (type, size, color etc.) or add a transparent overlay to your images. Simply configure the default loltext plugin with this command:

lolcommits --config -p loltext

To find out more, read about loltext options.

Animated Gif Capturing

Animated gifs can take a while to generate (depending on the number of seconds you capture and the capabilities of your machine). ffmpeg is required and can be installed like so;

To enable, just set the LOLCOMMITS_ANIMATE environment variable with the number of seconds to capture. If you find animated capturing takes too long, try setting LOLCOMMITS_FORK=true. Animated gif captures are currently NOT supported on Windows.

Example animated lolcommit
gif

Plugins

A growing number of plugins are available, allowing you to transform or share your lolcommits with others. The default plugin simply appends your commit message and sha to the captured image. Others can auto post to Twitter, Tumblr (and other services), or even translate your commit messages to lolspeak. They can be easily enabled, configured or disabled with the --config option:

lolcommits --config

Check them out on our plugins page.

Timelapse

To watch your face as it decays while you program, you can create an animated timelapse gif.

lolcommits --timelapse
# or for just today's lolcommits
lolcommits --timelapse --period today

Troubles?

Try our trouble-shooting FAQ, or take a read through our wiki for more information. If you think something is broken or missing, raise a Github issue (and please take a little time to check if we haven't already addressed it).