Showing posts with label bots. Show all posts
Showing posts with label bots. Show all posts

Saturday, December 5, 2009

Movies Bot and Bots website

movies@xmppguru.appspotchat.com

If sometimes you are at a video rent store, or in a torrent site searching for something to watch, and you often run out of convict opinion this is your Bot. Just send a message containing the name of the movie, and it will reply with a recommendation. 
I'm sure the Movies Bot can save you some money and time regarding "trash" movies, which by the way are big majority nowadays specially in Hollywood.
Of course you won't always agree about the opinion, but I'm pretty sure it will give you wise and precise alerts before renting/downloading really BAD movies!
Just give it a try and let us know the reliability of the answers.

NEWS!!!
Now you can follow the xmppguru and its extensions, go to http://xmppguru.appspot.com and check out in realtime latest questions and answers from other users.

Friday, December 4, 2009

quotes@xmppguru.appspotchat.com - a Self-Help Bot (or Not)

quotes@xmppguru.appspotchat.com

Yet Another XMPP Bot! This time it is meant for nice quotes that should increase your "anymus" at work, in a boring day or in both at the same time as usual. After checking that more than 25% of all messages to xmppguru@appspot.com where about personal problems and assistance requests, I decided to build something to help those poor XMPP users.
So basically the recommended usage is:

  1. Swear to the Bot! Use bad words freely. He always understand you... (This is a MUST, if you don't say anything he won't help you)
  2. Get a nice quote back that eventually will help you with motivation or pushes.

You can use the xmppguru extension by simple adding it to your GTalk's / Jabber Contacts: quotes@xmppguru.appspotchat.com

Examples of general usage
To receive a quote, simple express your feeling.

Chat Message: I hate this rainy day!!! Screw it!
quotes@xmppguru.appspot.com: "Sometimes water is better than snow..." - Someone from somewhere

Chat Message: what the f*** you are not helping shi*** bot!
zaptin@xmppguru.appspot.com: "" - "Honest disagreement is often a good sign of progress." - Gandhi

It is not scientifically proved, but it might help. At least, in the worst case, will be an always online friend that is always willing to hear your complains. Always there in your roster.

Thursday, December 3, 2009

URL Shortener XMPP Bot

zaptin@xmppguru.appspotchat.com

XMPP Provides easy and clean ways to build XMPP Bots, as I showed on the previous post, we can use Google AppEngine to create 24h online, zero-maintenance Bots. Yes, I don't need to host this. Google is doing the job for now, for free, let it be.

You can use the xmppguru extension to Short URL simply add it to your GTalk's / Jabber Contacts: zaptin@xmppguru.appspotchat.com

Examples of general usage
To request a Short Version of your URL just send a message containing the URL.

Chat Message: http://pixagle.appspot.com
zaptin@xmppguru.appspot.com: http://zapt.in/D5 -> http://pixagle.appspot.com

Chat Message: xmppjingle.org
zaptin@xmppguru.appspot.com: http://zapt.in/D1 -> http://xmppjingle.org

This is quite handy, avoiding all the hassle to visit one of the other URL Shorteners just to have a smaller URL.

Wednesday, December 2, 2009

XMPP Bots - XMPPGuru

xmppguru@appspot.com

XMPP Provides easy and clean ways to build XMPP Bots, as I showed on the previous post, we can use Google AppEngine to create 24h online, zero-maintenance Bots.


One interesting Bot is a Guru One, the main objective of this Bot is to clarify topics, answer general knowledge questions and retrieve hints for general opinion.
You can add it to your GTalk's / Jabber Contacts: xmppguru@appspot.com


Examples of general knowledge:
Question: What is Aerosmith?
xmppguru: Aerosmith is an American hard rock band, sometimes referred to as "The Bad Boys from Boston" and "America's Greatest Rock and Roll Band".

Question: What is an atomic bomb?
xmppguru: nuclear weapon: an explosive device whose destructive power is due to the uncontrollable release of energy from the fission of heavy nuclei, usually uranium-235 or plutonium-239, by neutrons sustaining a rapid chain reaction

Question:  Who invented the harpoon?
xmppguru: Endangered Species question: Who invented the harpoon cannon? Sven (or Svend) Foyn (1809-1894) was a whaler born in Tønsberg in southeast Norway. In 1856, he invented the bow ... 

Examples of general opinion:
Question: What is a good song?
xmppguruWhat is a good song to "give" someone who you are …


QuestionDo you trust god?
xmppguruThe Bible tells us to have faith: (Hebrews 11:6 NIV) And without faith it is impossible to please God, because anyone who comes to him must believe that he exists and that he ...


The Bot is not meant to have conscience neither deep lexical interpretation, the goal is to answer your question when possible, something directly with a straight answer, but something also vague hints.
For unknown answers the principe is the same of Horoscope, but in a scientific way. 
the best way of discovering how it works, purpose and functionality is by testing it.

Sometimes you will be surprised even asking by your full name. In the same way you will be surprised by crappy answers. Enjoy!

Sunday, November 29, 2009

Google App Engine XMPP Services Example



Google App Engine released the XMPP Services a while ago. The service started very basic and bad, but since then, it is improving a lot and have potential to be really worthy to build XMPP Services over it.
Unfortunately currently you might only be able to write bots. Which is not that bad specially for developers that are starting with XMPP and App Engine.

The documentation is not that good so far, but it was enough to create an EchoBot Demo App, you can download the full source here.
To use it, just explode the folder, make sure you have Google App Engine SDK configured, set your application ID, and deploy.
I strongly recommend to use Eclipse AppEngine Plugin for those tasks.

Quick Tutorial

Receiving Messages are handled by your application like an HTTP Post Request:
@SuppressWarnings("serial")
public class XmppbotServlet extends HttpServlet {
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws IOException {


Parsing Received Messages is piece of cake. AppEngine API is handy in that sense:
XMPPService xmpp = XMPPServiceFactory.getXMPPService();
        Message message = xmpp.parseMessage(req);


Creating a Response Message is also very simple:
JID fromJid = message.getFromJid();
String body = message.getBody();

// Create an Echo Message
Message response = new MessageBuilder().withMessageType(
message.getMessageType()).withBody(body)
.withRecipientJids(fromJid).build();


Now we send it back, without any specialist XMPP Knowledge required.
boolean messageSent = false;
SendResponse status = xmpp.sendMessage(response);
messageSent = (status.getStatusMap().get(fromJid) == SendResponse.Status.SUCCESS);

if (!messageSent) {
// An Error Occurred
}


Now you can create an XMPP Bot with just a few line of simple Java code.
Remarks:

  • Your Bot will auto accept every XMPP contact add request, which is quite handy too. To test your Bot, just open your XMPP Account in your preferred Client. And add the contact: YourAppName@appspotchat.com
  • It will auto-accept your request, and if your service is running, it will be shown as available.
  • You can also use aliases like: Whatever@YourAppName.appspotchat.com

Sunday, June 28, 2009

XMPP BOTs

A very cool and unexplored feature of XMPP is the easy way to build and deploy automated BOTs.
This is something that is not that easy to do on proprietary networks like Skype, MSN, Yahoo etc...
I will soon start to post here some XMPP BOTs including sources in order to build a collection.

Another great factor is that XMPP BOTs are totally about interoperability meaning that if you run in a XMPP Server with interoperability enable, you can have this BOT in your contact list even if you are not connected through that server. This is totally awesome!

If you have any BOT stable and interesting enough to worth a post, please send me the code and it might be added to the collection.

Let's start building another powerful and exclusive weapon against proprietary networks!