https://github.com/lolcommits/lolcommits-loltext
Lolcommits commit message annotation plugin
https://github.com/lolcommits/lolcommits-loltext
fun git git-addons humours lolcommits lolcommits-plugin ruby selfie webcam
Last synced: about 1 year ago
JSON representation
Lolcommits commit message annotation plugin
- Host: GitHub
- URL: https://github.com/lolcommits/lolcommits-loltext
- Owner: lolcommits
- License: lgpl-3.0
- Created: 2017-04-14T19:09:52.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2021-03-03T23:27:29.000Z (about 5 years ago)
- Last Synced: 2024-04-26T22:23:11.873Z (about 2 years ago)
- Topics: fun, git, git-addons, humours, lolcommits, lolcommits-plugin, ruby, selfie, webcam
- Language: Ruby
- Homepage: https://lolcommits.github.io
- Size: 332 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Lolcommits Loltext
[](https://github.com/lolcommits/lolcommits-loltext/actions/workflows/ci.yml)
[](http://rubygems.org/gems/lolcommits-loltext)
[](https://depfu.com/github/lolcommits/lolcommits-loltext)
[lolcommits](https://lolcommits.github.io/) 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](https://github.com/lolcommits/lolcommits-loltext#configuration) for
more information on the options available.
## Requirements
* Ruby >= 3.1
* A webcam
* [ImageMagick](http://www.imagemagick.org)
* [ffmpeg](https://www.ffmpeg.org) (optional) for animated gif capturing
## 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](https://twitter.com/matthutchin/status/738411190343368704)' 🕶 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](https://www.fontsquirrel.com/fonts/Raleway).
## 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](https://github.com/lolcommits/lolcommits-loltext/issues). Take a moment
to check it hasn't been raised in the past (and possibly closed).
## Contributing
Bug [reports](https://github.com/lolcommits/lolcommits-loltext/issues) and [pull
requests](https://github.com/lolcommits/lolcommits-loltext/pulls) 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](https://github.com/lolcommits/lolcommits-loltext/blob/master/CONTRIBUTING.md)
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](http://contributor-covenant.org) code of conduct. See
[here](https://github.com/lolcommits/lolcommits-loltext/blob/master/CODE_OF_CONDUCT.md)
for more details.
## License
The gem is available as open source under the terms of
[LGPL-3](https://opensource.org/licenses/LGPL-3.0).
## Links
* [CI](https://github.com/lolcommits/lolcommits-loltext/actions/workflows/ci.yml)
* [RDoc](https://rubydoc.info/gems/lolcommits-loltext)
* [Issues](http://github.com/lolcommits/lolcommits-loltext/issues)
* [Report a bug](http://github.com/lolcommits/lolcommits-loltext/issues/new)
* [Gem](http://rubygems.org/gems/lolcommits-loltext)
* [GitHub](https://github.com/lolcommits/lolcommits-loltext)