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!
This plugin annotates each lolcommit with the commit message and sha text. You can style and position these however you like, or add a transparent overlay color that covers the entire image.
By default your lolcommit will look something like this (maybe without the horse):
You can easily change the plugin options to achieve something like this:
See below for more information on the options available.
By default, this plugin is automatically included with the main lolcommits gem. If you have uninstalled this gem, install it again with:
$ gem install lolcommits-loltext
That's it! Every lolcommit will now be stamped with your commit message and sha. This plugin is enabled by default (if no configuration for it exists). To disable (so no text or overlay is applied) use:
$ lolcommits --config -p loltext # and set enabled to `false`
Configure this plugin with:
$ lolcommits --config -p loltext # set enabled to `true` (then set your own options or choose the defaults)
The following options are available:
- text color
- text font
- text position
- uppercase text?
- size (point size for the font)
- stroke color (font outline color, or none)
- transparent overlay (cover the image with a random background color)
- transparent overlay % (sets the fill colorize strength)
Please note that:
- The message and sha text can have different text options
- Any blank options will use the default (indicated when prompted for an option)
- Always use the full absolute path to font files
- Valid text positions are NE, NW, SE, SW, S, C (centered)
- Colors can be hex values (#FC0) or strings (white, red etc.)
- You can set one or more
overlay_colorsto pick from, separated with commas
With these options it is possible to create your own unique lolcommit format. To achieve these 'hipster styled' 🕶 commits, try the following:
loltext: enabled: true :message: :color: white :font: "/Users/matt/Library/Fonts/Raleway-Light.ttf" :position: C :size: 30 :stroke_color: none :uppercase: true :sha: :color: white :font: "/Users/matt/Library/Fonts/Raleway-Light.ttf" :position: S :size: 20 :stroke_color: none :uppercase: false :overlay: :enabled: true
NOTE: you can grab the '_Raleway-Light_' font for free from fontsquirrel.
Check out this repo and run
bin/setup, to install all dependencies and
generate docs. Run
bundle exec rake to run all tests and generate a coverage
You can also run
bin/console for an interactive prompt that will allow you to
experiment with the gem code.
MiniTest is used for testing. Run the test suite with:
$ rake test
Generate docs for this gem with:
$ rake rdoc
If you think something is broken or missing, please raise a new issue. Take a moment to check it hasn't been raised in the past (and possibly closed).
The gem is available as open source under the terms of LGPL-3.