Home > natter

natter

Natter is a project mainly written in Ruby, based on the MIT license.

A(nother) bot framework. Aiming to be transport-agnostic (but not there yet... patches please!)

Natter

A framework for creating chat-bots. At the moment it only works for fairly simple XMPP (Jabber) based bots because they're what I'm most interested in. I have plans to extend it to be able to communicate over AIM and e-mail too, but they're not quite as interesting to me so I may not ever do that work. If you're interested in those things, patches would be awesome!

Getting started

You'll need an XMPP account. You can get one easily be signing up to Google Talk. You'll also need to have the dependencies installed.

require natter's init.rb and you're good to go.

Use the path to wherever you've got Natter installed.

# require '.../natter/init.rb'

Define how the bot login in and reacts to stimuli.

#

nb. This will take over the current thread. If you want to run it in the

background of your application you'll need to wrap it in a new thread or

use Natter::Bot.new do ... end (which doesn't start the bot).

# bot = Natter.bot do username "[email protected]" password "password-here"

#
# ... define your behaviour here ...
# ... see the examples directory for available callbacks ...
#

end

Dependencies

RubyGems (tested with >= 1.2.0, may work with earlier) doodle >= 0.1.9 xmpp4r-simple >= 0.8.8

Contributors

Craig R Webster http://barkingiguana.com/~craig

Previous:SDLx-Test