README.md in safubot-0.0.2 vs README.md in safubot-0.0.3
- old
+ new
@@ -1,6 +1,6 @@
-# safubot - an evented chatbot framework for Ruby
+# safubot - an event-driven chatbot framework for Ruby
## <a name="overview">Overview</a>
Safubot is a chatbot framework for Twitter and XMPP which aims to abstract away the idiosyncracies of the underlying APIs, allowing you to focus on writing request-processing logic. Of course, if you want to use service-specific features (such as responding to timeline tweets) it lets you do that too!
## <a name="installation">Installation</a>
@@ -60,14 +60,19 @@
respond req, "#{e}"
end
end
end
- # You can run this from inside another EventMachine loop if
- # you don't want it to block indefinitely.
+ # This will fork the Twitter/XMPP streaming processes as needed
+ # and then wait for them. You can call run_nowait if you want
+ # a non-blocking form.
NiftyBot.new.run
+## <a name="logging">Logging</a>
+Safubot::Log behaves as a Logger instance and will write to stdout by default. You can also tell it to write to a file:
+ Safubot::Log.path = "/some/cool/logfile"
+
## <a name="example">Specific Examples</a>
### Find the last processed request from a user
on(:request) do |req|
@@ -84,10 +89,10 @@
if tweet.raw['user']['screen_name'] == "unnali"
@twitter.reply tweet, "Is HaeSeun OSS yet? :O"
end
end
-### Start an unprompted conversation with an XMPP user.
+### Start an unprompted conversation with an XMPP user
@xmpp.on(:ready) do
@xmpp.tell('^_^@jabber.org', "You'd best be maintaining safubot!")
end