Low commit activity in last 3 years
A long-lived project that still receives updates
Overlay the commit message and sha on your lolcommit. Configure text style, positioning, border and coloured overlay.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0.17.0
>= 0
 Project Readme

Lolcommits Loltext

Build Gem Depfu

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):

horse commit

You can easily change the plugin options to achieve something like this:

hipster commit

See below for more information on the options available.

Requirements

Installation

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`

Configuration

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 lolcommit 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_colors to 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
  :border:
    :enabled: false

NOTE: you can grab the 'Raleway-Light' font for free from fontsquirrel.

Development

Check out this repo and run bin/setup, to install all dependencies and generate docs. Run bundle exec rake to run all tests.

You can also run bin/console for an interactive prompt that will allow you to experiment with the gem code.

Tests

MiniTest is used for testing. Run the test suite with:

$ rake test

Docs

Generate docs for this gem with:

$ rake rdoc

Troubles?

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).

Contributing

Bug reports and pull requests are welcome on GitHub.

When submitting pull requests, remember to add tests covering any new behaviour, and ensure all tests are passing. Read the contributing guidelines for more details.

This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct. See here for more details.

License

The gem is available as open source under the terms of LGPL-3.

Links