8. Set up the Application Create an application at appengine.google.com Set up an application identifier <app>.appspot.com
9. App Engine SDK Download the App Engine SDK from http://code.google.com/appengine/downloads.html Start the App Engine Launcher and create a new application
10. Set up the app.yaml application: uncle-milty version: 2 runtime: python api_version: 1 handlers: - url: /_wave/.* script: uncle-milty.py - url: /assets static_dir: assets
11. Wave Robot API Download the files from svn: svn checkout http://wave-robot-python-client.googlecode.com/svn/trunk/src/waveapi waveapi Drop it in the application directory
12. Wave Concepts Wavelet The conversation taking place within Google Wave Blip Every message as part of the wavelet Hierarchical Each of these have unique identifiers that can be used to programmatically address them
13. Project Overview A simple chat bot Searches the library catalog for results
14. Code it up! Available on github: http://github.com/MrDys/uncle-milty
15. External Libraries External libraries are a-okay Just drop it in the project directory Going to use BeautifulSoup to scrape the OPAC
16. Imports from waveapi import events from waveapi import model from waveapi import robot from waveapi import document from waveapi.ops import OpBuilder import logging import urllib2 from BeautifulSoup import BeautifulSoup
17. OnRobotAdded Function def OnRobotAdded(properties, context): """Invoked when the robot has been added.""" logging.debug("created") root_wavelet = context.GetRootWavelet() root_wavelet.CreateBlip().GetDocument().SetText("Hi, I'm Milton S. Eisenhower and I'd be happy to help you with your research. I will search the JHU catalog for anything that you say to me and I'll let you know if I find anything.")