Sunday, 28 February 2010

A working wave export bot

The original Wave exporty bot doesn't work for me. Wave uses user@wavesandbox.com or user@googlewave.com as user identifier, while appengine, the thing that powers bots, gives the bot the regular google account identifiers (their emails). If you don't happen to use foobar@wavesandbox.com with foobar@gmail.com -- for which the exporty bot contains an ugly hack -- exporty won't work for you as the participants check fails and exporty will deny access.

That is why I rewrote exporty not to care for user ids too much but use access tokens. It is pretty simple, the bot when added to a wave, writes the link of the export http://mybot.appspot.com/export?waveId=yourwaveId into the wave as the original bot does, but also appends to that accessToken=<a random generated string>. Everyone observing the link in the wave, usually the participants, can click on the link and get the export without being bother by the google account signup. The participants check is replaced by an access token check. I found this version to be much more useful, as the URL provided by this bot can be used in scripts more easily.

I also added the feature that you can export your wave raw, without any HTML or XML annotations. Try it, exporty2@appspot.com. It hosts its source: http://exporty2.appspot.com/static/exporty2.tar.bz2

No comments: