Google Wave Robot :: Standard Commands

Filed under: Google, Technology, Wave — Tags: , , , , , , , , , , — Developer42 @ 19:57

Currently each programmer writing a bot for Google Wave is able to write whatever they want, sometimes providing support, but using their own, custom syntax. Having a set of commands which all (or many) bots implement would make the user experience far better, as users would then be able to easily find out how to use the bot, or where to find additional help.
e.g. /? //see /help /help //brings up a list of commands available /about //displays a summary of what this robot does /devsite //provides a link to the developer’s site /mode private //the bot’s responses are only shown to the person who invited it /mode public //everyone in the wave sees the bot’s responses

I’ve also made a summary of this post available on the Google Wave Bots site. Please can you post any responses to that site, as this will allow all communications to be kept in the same place.


Ideas for Wave Robots

Filed under: Google, Ideas, Technology, Wave — Tags: , , , , , , , , , , , — Developer42 @ 21:32

One of the hardest things about developing a wave robot is coming up with an original idea. My smiley bot [] was just for me to play with wave & get used to uploading apps to App Engine / get back into java coding and using eclipse. Now that that’s done, it’s time to think of something useful; an application that people will actually want to use. The point of this post is partly a brainstorming session for myself, and partly to put these ideas out there to anyone stuck for ideas, who think they can code one of these, and finally, to encourage others to submit ideas.

Webby – The Web Service Robot
A robot which when added, detects any URLs pointing to web services, generates a form based on the parameters, then submits this data via SOAP, and puts the return value into a new blip.

Squely – A Database Query Bot
A robot which can run SQL statements against given connection strings. At present, this will only be possible if the database is publicly accessible, or if you have a wave server installed on the same network as your database.

QIFry – Interesting
This robot would monitor waves for key words, then on detection, pop in an interesting fact about that word (e.g. if it spots the word Banana, it says “did you know that bananas are herbs, and these shrubs can walk?”). It also monitors for boring words, and replaces them with more eloquent ones.

Pretty – Pretty Print
Detects common languages / markup & changes the layout to make it more readable.

Finds recipes based on ingredients or dish names in the wave.

Uses the GEO features of HTML 5 to locate where each wave user is and lets wavers know where their nearest wavers are. This could also take info about their interests to help match people up to folks whose hobbies they share.


My First Wave Robot ::

Filed under: Google, Technology, Wave — Tags: , , , , , , , — Developer42 @ 00:34 first demo


<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="">


<?xml version="1.0" encoding="utf-8"?>
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
<web-app xmlns="" version="2.5">


<?xml version="1.0" encoding="utf-8"?>
<w:robot xmlns:w="">
    <w:capability name="blip_submitted" content="true" />
    <w:capability name="wavelet_self_added" content="true" />

import java.util.*;
//FIX FOR ISSUE 354 is used where the robot suffers from the bug mentioned in the below links
public class SmileyServlet extends AbstractRobotServlet {
	 * Robot's version id & usage info
	private static final long serialVersionUID = 1L;
	private static final long serialSubVersionUID = 2L; //this is to help me prove that my latest changes 
                                                            //have been uploaded correctly
	private static final String serialVersionID = "Version #" + new Long(serialVersionUID).toString() + "." + 
                                                      new Long(serialSubVersionUID).toString();
	private static final String helpInfo = "\nThis robot is my learning tool for wave development, " +
                                               "so may occasionally break!  Apologies if you're one of " +
                                               "the people for whom it doesn't work!";
	private static HashMap dictionary = null;
	 * Creates the images & registers them against their invoking smileys 
	 * */	
	static {
		final int width = 24;
		final int height = 24;
		dictionary = new HashMap();
		dictionary.put(":)",new Image("",width,height,":)"));
		dictionary.put(":(",new Image("",width,height,":("));
		dictionary.put(";)",new Image("",width,height,";)"));
		dictionary.put(":D",new Image("",width,height,":D"));
     * Handles changes to the wave 
	public void processEvents(RobotMessageBundle bundle) {		
		if (bundle.wasSelfAdded()) {
			final Blip blip = bundle.getWavelet().appendBlip();
			blip.getDocument().delete(); //FIX FOR ISSUE 354
			final TextView textView = blip.getDocument();
			textView.append( serialVersionID );
			textView.append( helpInfo );
		for (Event e: bundle.getEvents()) {
			if ((e.getType() == EventType.BLIP_SUBMITTED) || (e.getType() == EventType.WAVELET_SELF_ADDED)) {
				final Blip blip = e.getBlip();
	private void smile(TextView textView){
		final String text = textView.getText();
		Iterator<Map.Entry> i = dictionary.entrySet().iterator();
			Map.Entry pic =;
			String key = pic.getKey();
			int pos = -1;
			while((pos = text.indexOf(key,++pos))>-1){
				textView.delete(new Range(pos, pos + key.length()));


Blog at

%d bloggers like this: