Hato 
Hato is a tool to manage various notification methods. Once you configure notification methods, you can send messages via the methods just by posting them to Hato.
Usage
Launch Hato with hato command:
$ hato -c config.rb
Then, post your notification message:
$ curl -d 'message=test' -d 'tag=test' -d 'api_key=test' http://localhost:9699/notify
Configuration
Hato provides DSLs for configuration.
e.g. config.rb:
Hato::Config.define do
api_key 'test'
host '0.0.0.0'
port 9699
tag 'test' do
plugin 'Ikachan' do
scheme 'http'
host 'irc.example.com'
port 4979
channel 'hato'
end
plugin 'Mail' do
smtp address: 'smtp.example.com',
port: 587,
domain: 'example',
user_name: 'hato',
password: 'password',
enable_ssl: true
subject_template = "[<%= args[:tag] %>] Notification\n"
body_template = "You've got a message:\n\n<%= args[:message] %>\n"
from: '[email protected]',
to: [
'[email protected]',
'[email protected]',
],
subject_template: subject_template,
body_template: body_template
end
end
end
Plugin Architecture
Hato bundles several plugins by default:
You can easily extend Hato by creating your own plugins. See the source for detail. It's really easy.
Using Hato with Thrid-party Plugins
At first, create a Gemfile to manage dependencies:
source 'https://rubygems.org'
gem 'hato'
gem 'hato-plugin-awesome_plugin'
Then, execute bundle exec hato -c your_config_file
Installation
Add this line to your application's Gemfile:
gem 'hato'
And then execute:
$ bundle
Or install it yourself as:
$ gem install hato
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request