Configuring Plugins

Matthew Hutchinson edited this page Dec 20, 2016 · 14 revisions

Lolcommits currently has 12 plugins that (when enabled) perform additional work on your lolcommit image after capturing. To list or configure the available plugins use the following commands:

lolcommits --plugins
lolcommits --config
# OR
lolcommits --config -p plugin-name

Set the enabled flag to true or false to turn a plugin ON or OFF.

NOTE: You must answer true/false (or yes/no) for the plugin's enabled option to be set correctly. Anything other than true or yes will cause the plugin to remain disabled.

You can always check the current lolcommits configuration file (per repository and stored at $HOME/.lolcommits/$REPOSITORY_NAME/config.yml) with this command:

lolcommits --show-config
# OR
lolcommits -sc

And now... the plugins!

loltext

The default plugin that overlays your git commit message onto the lolcommit capture. You can adjust the font, color, size and position of text on your lolcommit. Both sha and commit message options can be set with:

lolcommits --config -p loltext

Read configuring commit capturing, for full details on all loltext options.

NOTE: If you want naked images, disable this plugin.

slack

Sends your commit images to one (or more) Slack channels. First ensure you are logged into Slack in your browser. Then to configure and enable the plugin run:

lolcommits --config -p slack

You'll be asked to open this page in your browser and generate a new API token. You can either quickly generate a test token, or register a new 'Slack Application' and use the OAuth token from that. After setting your token, set the channels you'd like to post to, unfortunately you need to use the salck channel ID (rather than channel name), you can grab these from fire this request and scanning the JSON response.

That's it! Your next lolcommit will appear in the channel chat for all to see.

twitter

Sends your commit images and messages to a Twitter account. To enable run:

lolcommits --config -p twitter

You'll be asked to open your browser to generate a new authentication PIN. Enter the PIN when prompted. This saves a Twitter access_key and token to your lolcommits config file. Your next lolcommits will be tweeted.

NOTE: if you enable this plugin for another repository you may want to copy the yaml credentials too (so Twitter does not de-authorize the connection).

dot_com

lolcommits-dot-com is web app hosting lolcommits for multiple repositories! You can signup for free via GitHub authentication.

From the top menu, click 'New Repo' (and give your repository a name). Then click 'Account Info' to see the keys you'll need to configure the gem;

# cd to your local lolcommits enabled repo and type
lolcommits --config --p dot_com

enabled: [true or false]
api_key: [API Key]
api_secret: [API Secret]
repo_id: [Repo External Id]

Now all future lolcommits in this repo will be uploaded to the lolcommits-dot-com app. The app itself has been open-sourced and lives on GitHub, pull-requests are welcome!

tranzlate

TRANZLATE YOAR COMMIT MSG TO LOLSPEKK - U CAN HAZ ENABLEZ WITH:

lolcommits --config -p tranzlate

and set enabled to true

uploldz

Uploads your lolcommits to any remote server with an HTTP POST request. For central storage and/or more lolz.

The request will include the image under the key file, and the repository it came from under repo. Useful for teams who want to share their lolcommits with each other! To enable, run:

lolcommits --config -p uploldz

Set an endpoint (the URL of where you want to send the POST requests) and enabled to true.

lolsrv

lolsrv is a small Rest-ful Sinatra app you can host to show off your lolcommits. It uses mongodb and can be easily hosted on Heroku. Configure the plugin to upload and sync with the following:

lolcommits --config -p lolsrv

Specify the server's host name (e.g. http://mylolsrv.com), and set enabled to true.

yammer

Yammer provides collaboration software that empowers employees to be more productive and successful, making it easier to take on any business challenge.

Post status to your Yammer organization with the commit message and lolcommit image.

lolcommits --config -p yammer

You will be asked to open a URL in your browser. This will take you to Oauth page in Yammer. Allow the app and copy the code param when redirected to localhost, then paste it in the prompt.

tumblr

A simple plugin to post to your Tumblr. Configure it with a Tumblr access token and secret. This plugin's config will guide you through the process.

lolcommits --config -p tumblr

flowdock

Plugin to post to a FlowDock chat room. The plugin will walk you through getting an access token and configuring which room to post to.

lolcommits --config -p flowdock

hipchat

Plugin to post to a HipChat chat room. The plugin will walk you through configuring which room to post to.

lolcommits --config -p hipchat

term_output

Outputs the lolcommit image on the terminal command line immediately after capturing. Currently only iTerm2 supports this. See here for an example of how this looks.

lolcommits --config -p term_output