diff --git a/README b/README deleted file mode 100644 index 26dcc9f..0000000 --- a/README +++ /dev/null @@ -1,33 +0,0 @@ -Ruby library for GNTP(Growl Notification Transport Protocol) - -Sorry, document is not avilable now. - -Usage example: - -require 'rubygems' -require 'ruby_gntp' - -# -- Standard way -growl = GNTP.new("Ruby/GNTP self test") -growl.register({:notifications => [{ - :name => "notify", - :enabled => true, -}]}) - -growl.notify({ - :name => "notify", - :title => "Congraturation", - :text => "Congraturation! You are successful install ruby_gntp.", - :icon => "http://www.hatena.ne.jp/users/sn/snaka72/profile.gif", - :sticky=> true, -}) - -# -- Instant notification -GNTP.notify({ - :app_name => "Instant notify", - :title => "Instant notification", - :text => "Instant notification available now.", - :icon => "http://www.hatena.ne.jp/users/sn/snaka72/profile.gif", -}) - - diff --git a/README.md b/README.md new file mode 100644 index 0000000..5695572 --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +# Ruby GNTP + +Ruby library for GNTP (Growl Notification Transport Protocol) + +## Installation + +``` +$ gem install ruby_gntp +``` +Or, with bundler: + +``` +# Gemfile +gem 'ruby_gntp' +``` + +## Usage + +```ruby +require 'rubygems' +require 'ruby_gntp' + +# Standard way +growl = GNTP.new("Ruby/GNTP self test") +growl.register({:notifications => [{ + :name => "notify", + :enabled => true, +}]}) + +growl.notify({ + :name => "notify", + :title => "Congraturation", + :text => "Congraturation! You are successful install ruby_gntp.", + :icon => "http://www.hatena.ne.jp/users/sn/snaka72/profile.gif", + :sticky => true, +}) + +# Instant notification +GNTP.notify({ + :app_name => "Instant notify", + :title => "Instant notification", + :text => "Instant notification available now.", + :icon => "http://www.hatena.ne.jp/users/sn/snaka72/profile.gif", +}) +``` \ No newline at end of file