Tweetgithub

This is a Ruby Gem that creats a post in a Jekyll based Git site and posts a tweet at the same time.

To use it, you'll need to create a YAML file with your basic setup information and Twitter API credentials:

consumer_key: "" consumer_secret: "" access_token: "" access_token_secret: "" author: "" posts_dir: "/Somewhere/repos/repo/_posts/"

Programmatically:

tw = Tweetgithub::Tweetgithub.new("/Users/someone/Desktop/tweet-github/twitter_secrets.yml")
tw.tweet('Post text')

From the command-line:

tweetgithub /Path/to/Yaml/ "Tweet text" 

This will create a post in the Jekyll site then add, commit, and push the post, while also pushing it to Twitter.

Installation

Add this line to your application's Gemfile:

gem 'tweetgithub'

And then execute:

$ bundle

Or install it yourself as:

$ gem install tweetgithub