Jabber Bot

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    4 Favorites

    Jabber Bot - Presentation Transcript

    1. Jabber Bot By Ezwan Aizat bin Abdullah Faiz aizat.faiz@gmail.com http://aizatto.com http://creativecommons.org/licenses/by/3.0/ http://flickr.com/photos/warmnfuzzy/466382464/
    2. http://creativecommons.org/licenses/by/3.0/ http://flickr.com/photos/warmnfuzzy/466382464/
    3. http://creativecommons.org/licenses/by/3.0/ http://flickr.com/photos/warmnfuzzy/466382464/
    4. http://flickr.com/photos/warmnfuzzy/466382464/
    5. Who Am I? Go by many names Student ezwan aizat bin abdullah faiz Web Developer aizatto That out of shape zatto guy trying to climb a mountain
    6. Warning! http://tango.freedesktop.org
    7. There will be CODE http://tango.freedesktop.org
    8. a persons ability to type/code is greatly impaired when presenting http://tango.freedesktop.org
    9. BDD Behavior Driven Development http://behaviour-driven.org/ http://en.wikipedia.org/wiki/Behavior_Driven_Development http://flickr.com/photos/baboon/3946055/
    10. What is Jabber?
    11. What is XMPP? eXtensible Messaging and Presence Protocol http://en.wikipedia.org/wiki/XMPP
    12. why? http://flickr.com/photos/genewolf/147722495/
    13. fun http://flickr.com/photos/evank750i/306288390/
    14. services built on top of
    15. Straw Poll http://strawpollnow.com
    16. foamee http://foamee.com
    17. under construction...
    18. monitoring http://flickr.com/photos/parl/3231111/
    19. any other ideas? http://flickr.com/photos/genewolf/147722495/
    20. Lets start CODING! http://flickr.com/photos/warmnfuzzy/466382456/
    21. RubyGems Execute: sudo gem install xmpp4r ZenTest rspec daemons Optional: sudo gem install hpricot http://flickr.com/photos/mikeleary83/1729114228/
    22. Setup Directory Structure Execute: mkdir -p xmpp/{autotest,bin,db,config,lib,spec/sample} http://flickr.com/photos/mikeleary83/1729114228/
    23. Setup Autotest File: ./autotest/discover.rb Contents: Autotest.add_discovery do \"rspec\" end Execute: autotest http://flickr.com/photos/mikeleary83/1729114228/
    24. Create Spec for Client#apply_rules(message) File: ./spec/client_spec.rb http://flickr.com/photos/mikeleary83/1729114228/
    25. Implement Client#apply_rules(message) File: ./lib/client.rb http://flickr.com/photos/mikeleary83/1729114228/
    26. We would like to use actual XMPP messages We would like to use actual XMPP messages, serialized Need to capture them somehow Create Daemon to serialize messages, easier to recreate messages http://flickr.com/photos/mikeleary83/1729114228/
    27. Create Daemon File: ./config/jabber.yml File: ./bin/daemon.rb http://flickr.com/photos/mikeleary83/1729114228/
    28. Create Daemon Start: ruby bin/daemon.rb start Stop: ruby bin/daemon.rb stop http://flickr.com/photos/mikeleary83/1729114228/
    29. Wait for Tweets to come in and serialize http://flickr.com/photos/mikeleary83/1729114228/
    30. or use sample ones... http://flickr.com/photos/mikeleary83/1729114228/
    31. <?xml version=\"1.0\"?> <message xmlns=\"jabber:client\" from=\"twitter@twitter.com\" type=\"chat\" id=\"tag:twitter.com:2877533\" to=\"aizat.faiz@gmail.com\"> <body>seanx2: @strawpoll cat KITTIES FTW!!!</body> <entry xmlns=\"http://www.w3.org/2005/Atom\"> <source> <title>Twitter / seanx2</title> <link href=\"http://twitter.com/seanx2\"/> <link href=\"http://twitter.com/statuses/user_timeline/seanx2.atom\" rel=\"self\" type=\"application/atom+xml\"/> <author> <name>seanx2</name> </author> <icon>http://s3.amazonaws.com/twitter_production/profile_images/24969932/ seanx2_normal.png</icon> </source> <title>seanx2: @strawpoll cat KITTIES FTW!!!</title> <summary>seanx2: @strawpoll cat KITTIES FTW!!!</summary> <link href=\"http://twitter.com/seanx2/statuses/777710064\" rel=\"alternate\" type=\"text/ html\"/> <id>tag:twitter.com,2008-03-27T01:10:41+00:00:/statuses/777710064</id> <published>2008-03-27T01:10:41+00:00</published> <updated>2008-03-27T01:10:41+00:00</updated> </entry> </message> http://flickr.com/photos/mikeleary83/1729114228/
    32. <?xml version=\"1.0\"?> <message xmlns=\"jabber:client\" from=\"twitter@twitter.com\" type=\"chat\" id=\"tag:twitter.com:2877533\" to=\"aizat.faiz@gmail.com\"> <body>seanx2: @strawpoll cat KITTIES FTW!!!</body> <entry xmlns=\"http://www.w3.org/2005/Atom\"> <source> <title>Twitter / seanx2</title> <link href=\"http://twitter.com/seanx2\"/> <link href=\"http://twitter.com/statuses/user_timeline/seanx2.atom\" rel=\"self\" type=\"application/atom+xml\"/> <author> <name>seanx2</name> </author> <icon>http://s3.amazonaws.com/twitter_production/profile_images/24969932/ seanx2_normal.png</icon> </source> <title>seanx2: @strawpoll cat KITTIES FTW!!!</title> <summary>seanx2: @strawpoll cat KITTIES FTW!!!</summary> <link href=\"http://twitter.com/seanx2/statuses/777710064\" rel=\"alternate\" type=\"text/ html\"/> <id>tag:twitter.com,2008-03-27T01:10:41+00:00:/statuses/777710064</id> <published>2008-03-27T01:10:41+00:00</published> <updated>2008-03-27T01:10:41+00:00</updated> </entry> </message> http://flickr.com/photos/mikeleary83/1729114228/
    33. <?xml version=\"1.0\"?> <message xmlns=\"jabber:client\" from=\"twitter@twitter.com\" type=\"chat\" id=\"tag:twitter.com:952601\" to=\"aizat.faiz@gmail.com\"> <body>rajaseelan: wow .. jigdo me this batman: Im still downloading Fedora 9 Beta, since yesterday 0630 :P</body> <entry xmlns=\"http://www.w3.org/2005/Atom\"> <source> <title>Twitter / rajaseelan</title> <link href=\"http://twitter.com/rajaseelan\"/> <link href=\"http://twitter.com/statuses/user_timeline/rajaseelan.atom\" rel=\"self\" type=\"application/atom+xml\"/> <author> <name>rajaseelan</name> </author> <icon>http://s3.amazonaws.com/twitter_production/profile_images/36242282/raja- profile_normal.png</icon> </source> <title>rajaseelan: wow .. jigdo me this batman: Im still downloading Fedora 9 Beta, since yesterday 0630 :P</title> <summary>rajaseelan: wow .. jigdo me this batman: Im still downloading Fedora 9 Beta, since yesterday 0630 :P</summary> <link href=\"http://twitter.com/rajaseelan/statuses/777649976\" rel=\"alternate\" type=\"text/html\"/> <id>tag:twitter.com,2008-03-26T22:48:10+00:00:/statuses/777649976</id> <published>2008-03-26T22:48:10+00:00</published> <updated>2008-03-26T22:48:10+00:00</updated> </entry> </message> http://flickr.com/photos/mikeleary83/1729114228/
    34. <?xml version=\"1.0\"?> <message xmlns=\"jabber:client\" from=\"twitter@twitter.com\" type=\"chat\" id=\"tag:twitter.com:952601\" to=\"aizat.faiz@gmail.com\"> <body>rajaseelan: wow .. jigdo me this batman: Im still downloading Fedora 9 Beta, since yesterday 0630 :P</body> <entry xmlns=\"http://www.w3.org/2005/Atom\"> <source> <title>Twitter / rajaseelan</title> <link href=\"http://twitter.com/rajaseelan\"/> <link href=\"http://twitter.com/statuses/user_timeline/rajaseelan.atom\" rel=\"self\" type=\"application/atom+xml\"/> <author> <name>rajaseelan</name> </author> <icon>http://s3.amazonaws.com/twitter_production/profile_images/36242282/raja- profile_normal.png</icon> </source> <title>rajaseelan: wow .. jigdo me this batman: Im still downloading Fedora 9 Beta, since yesterday 0630 :P</title> <summary>rajaseelan: wow .. jigdo me this batman: Im still downloading Fedora 9 Beta, since yesterday 0630 :P</summary> <link href=\"http://twitter.com/rajaseelan/statuses/777649976\" rel=\"alternate\" type=\"text/html\"/> <id>tag:twitter.com,2008-03-26T22:48:10+00:00:/statuses/777649976</id> <published>2008-03-26T22:48:10+00:00</published> <updated>2008-03-26T22:48:10+00:00</updated> </entry> </message> http://flickr.com/photos/mikeleary83/1729114228/
    35. Hpricot A Fast, Enjoyable HTML Parser for Ruby http://code.whytheluckystiff.net/hpricot/ http://flickr.com/photos/mikeleary83/1729114228/
    36. i hpricot http://flickr.com/photos/mikeleary83/1729114228/
    37. I can use the serialized Tweets in the spec now File: ./spec/client_spec.rb http://flickr.com/photos/mikeleary83/1729114228/
    38. Flesh out my Bot File: ./spec/client_spec.rb File: ./lib/client.rb http://flickr.com/photos/mikeleary83/1729114228/
    39. Build your own bot Army! http://flickr.com/photos/dystopos/8921528/
    40. http://flickr.com/photos/dystopos/8921528/
    41. any other ideas? http://flickr.com/photos/genewolf/147722495/
    42. kthxbai aizat.faiz@gmail.com http://creativecommons.org/licenses/by/3.0/ http://flickr.com/photos/warmnfuzzy/466382466/

    + Aizat FaizAizat Faiz, 2 years ago

    custom

    1133 views, 4 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1133
      • 1133 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 4
    • Downloads 20
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories