README.rdoc in robut-0.2.1 vs README.rdoc in robut-0.3.0

- old
+ new

@@ -18,14 +18,14 @@ Others listen to everything, and don't require an @reply. Some of the included plugins require extra gems to be installed: -[Robut::Plugin::TWSS] requires the <tt>twss</tt> gem -[Robut::Plugin::Meme] requires the <tt>meme_generator</tt> gem -[Robut::Plugin::Calc] requires the <tt>calc</tt> gem -[Robut::Plugin::Rdio] requires the <tt>rdio</tt> and <tt>sinatra</tt> gems +[Robut::Plugin::TWSS] requires the <tt>twss</tt> gem. +[Robut::Plugin::Calc] requires the <tt>calc</tt> gem. +[Robut::Plugin::Rdio] requires the <tt>rdio</tt> and <tt>sinatra</tt> gems. +[Robut::Plugin::Weather] requires the <tt>nokogiri</tt> gem. == The Chatfile When the +robut+ command runs, it looks for and evals ruby code in a file called +Chatfile+ in the current directory. You can override the @@ -86,38 +86,97 @@ == Built-in plugins Robut includes a few plugins that we've found useful: -[Robut::Plugin::Calc] a simple calculator. <br /> <br /> Example: <tt>@robut calc 1 + 1 # => 2</tt> -[Robut::Plugin::Lunch] a random decider for lunch locations. <br /> <br /> Example: <tt>@robut lunch? # => "Banh Mi!"</tt> -[Robut::Plugin::Meme] an interface to memegenerator.net. <br /> <br /> Example: <tt>@robut meme Y_U_NO FIX THE BUILD?</tt> -[Robut::Plugin::Sayings] a simple regex listener and responder. <br /> <br /> Example: <tt>You're the worst robot ever, @robut. # => I know. </tt> -[Robut::Plugin::TWSS] an interface to the TWSS gem. Listens to anything said in the chat room and responds "That's what she said!" where appropriate. <br /> <br /> Example: <tt>well hurry up, you're not going fast enough # => "That's what she said!" </tt> -[Robut::Plugin::Echo] echo back whatever it gets. <br /> <br /> Example: <tt>@robut echo hello word</tt> -[Robut::Plugin::Say] invokes the "say" command (text-to-speech). <br /> <br /> Example: <tt>@robut say this rocks</tt> -[Robut::Plugin::Ping] responds with "pong". <br /> <br /> Example: <tt>@robut ping</tt> -[Robut::Plugin::Later] performs the given command after waiting an arbitrary amount of time. <br /> <br /> Example: <tt>@robut in 5 minutes echo @justin wake up!</tt> -[Robut::Plugin::Rdio] uses the Rdio[http://www.rdio.com] API and a simple web server to queue and play songs on Rdio. <br /> <br /> Example: <tt>@robut play ok computer</tt> +[Robut::Plugin::Calc] a simple calculator. + @robut calc 1 + 1 # => 2 + + +[Robut::Plugin::Lunch] a random decider for lunch locations. + + @robut lunch? # => "Banh Mi!" + + +[Robut::Plugin::Meme] an interface to memecaptain. + + @robut meme all_the_things drink; all the beer + + +[Robut::Plugin::Sayings] a simple regex listener and responder. + + You're the worst robot ever, @robut. # => I know. + +[Robut::Plugin::TWSS] an interface to the TWSS gem. Listens to anything said in the chat room and responds "That's what she said!" where appropriate. + + well hurry up, you're not going fast enough # => "That's what she said!" + + +[Robut::Plugin::Echo] echo back whatever it gets. + + @robut echo hello world # => "hello world" + + +[Robut::Plugin::Say] invokes the "say" command (text-to-speech). + + @robut say this rocks # (make sure robut is running on a machine with speakers :) + + +[Robut::Plugin::Ping] responds with "pong". + + @robut ping # => "pong" + + +[Robut::Plugin::Later] performs the given command after waiting an arbitrary amount of time. + + @robut in 5 minutes echo @justin wake up! # => (5 minutes later) "@justin wake up!" + + +[Robut::Plugin::Rdio] uses the Rdio[http://www.rdio.com] API and a simple web server to queue and play songs on Rdio. + + @robut play ok computer + + +[Robut::Plugin::Weather] uses Google Weather to fetch for the weather for a given location and day. + + @robut seattle weather saturday? # => "Forecast for Seattle, WA on Sat: Sunny, High: 77F, Low: 55F" + +[Robut::Plugin::Alias] creates aliases to other robut commands. + + @robut alias "cowboy" "@robut play bon jovi wanted dead or alive" # Cuz somtimes you need it. + @robut alias w weather? # less typing for common stuff + +[Robut::Plugin::Help] lists usage for all the plugins loaded into robut + + @robut help # => command usage + == Writing custom plugins -You can supply your own plugins to Robut. To create a plugin, subclass -Robut::Plugin::Base and implement the <tt>handle(time, sender_nick, -message)</tt> to perform any plugin-specific logic. +You can supply your own plugins to Robut. To create a plugin, include +the Robut::Plugin module and implement the <tt>handle(time, +sender_nick, message)</tt> to perform any plugin-specific logic. -Robut::Plugin::Base provides a few helper methods that are documented +Robut::Plugin provides a few helper methods that are documented in its class definition. == Contributing -Once you've made your great commits: +To test your changes: +1. Install [Bundler](http://gembundler.com/) +2. Run `bundle install` +3. Make your changes and run `bundle exec ruby -Ilib bin/robut ~/MyTestingChatfile` +4. Add tests and verify by running `bundle exec rake test` + +Once your changes are ready: + 1. Fork robut -2. Create a topic branch - git checkout -b my_branch -3. Push to your branch - git push origin my_branch -4. Send me a pull request -5. That's it! +2. Create a topic branch: `git checkout -b my_branch` +3. Commit your changes +4. Push to your branch: `git push origin my_branch` +5. Send me a pull request +6. That's it! == Todo * Support connections to multiple rooms * More plugins! \ No newline at end of file