Grapevine - Message Aggregator
Grapevine is a server for loading messages from various sources, aggregating and trending messages into topics, and then sending notifications for trending topics to Twitter.
Grapevine follows the rules of Semantic Versioning.
To install Grapevine, simply install the gem:
$ [sudo] gem install grapevine
And then install the DataMapper adapter you'll be using. By default, Grapevine
will use a SQLite3 database at
~/grapevine.db. You can change this in the
$ gem install dm-sqlite-adapter $ gem install dm-mysql-adapter
Then run the
grapevine command to manage your server.
$ grapevine start $ grapevine stop $ grapevine restart
Grapevine also comes with a command line interface to find more information on your messages and topics. The following commands are available:
$ grapevine load $ grapevine notify $ grapevine show messages $ grapevine show notifiers $ grapevine show notifier [NAME] $ grapevine show sources $ grapevine show tags $ grapevine show topics $ grapevine show topic [NAME]
For more information on each command, you can view the inline help:
$ grapevine help [COMMAND]
SOURCES & NOTIFIERS
Grapevine has a pluggable architecture that allows any message sources to be matched up with any set of topic notification mechanisms.
Currently Grapevine supports the following sources:
twitter-trackback- Retrieves tweets for a given site.
twitter-github- Retrieves tweets associated with GitHub projects. Allows filtering of projects based on programming language.
And the following notification mechanisms are available:
Sources, notification mechanisms and other options can be specified in the
~/grapevine.yml file. Global configuration options for the Bit.ly API key and
Twitter API consumer keys are listed at the top.
The following is an example configuration file:
This configuration file sets up a single source to retrieve messages from
Twitter that mention GitHub projects. It then sets up two notifiers to send out
trending topics pulled from
my_github_source that are tagged with the
ruby languages, respectively. The Twitter authorization is
specified for each notifier with the
frequency property sets how often topics will be sent out. In this example
github_js Twitter account will send out every hour and a half while the
github_rb Twitter account will send out every two hours. The
specifies how long until a trending topic can be mentioned again. In this
example, topics can be mentioned again six months after their last mention.
window properties are time periods that can be defined
in a short hand. The following are the available time periods:
OAuth is not an easy process for people who are not familiar with it. Luckily, there is Authoritarian.
To start, register your Twitter application here:
Then install Authoritarian and add your application:
$ gem install authoritarian $ authoritarian add application # Follow the prompts
You can find your Consumer Key and Consumer Secret on your Twitter application's page at the Twitter Developers site mentioned above.
Next add the Twitter users you want to authorize:
$ authoritarian add user # Input your username and password
Once you've added all your users, you can find the OAuth token and token secrets by listing all your users:
$ authoritarian show users --all
Simple copy the consumer token and secret to your Grapevine configuration.
If you'd like to contribute to Grapevine, start by forking the repository on GitHub:
Then follow these steps to send your changes:
- Clone down your fork
- Create a topic branch to contain your change
- All code must have MiniTest::Unit test coverage.
- If you are adding new functionality, document it in the README
- If necessary, rebase your commits into logical chunks, without errors
- Push the branch up to GitHub
- Send me a pull request for your branch