Learn about the Google Wave Federation Protocol and get involved
Wave AlphaBy: Mark Fayngersh - Sep 05, 2009Query and retrieve Wolfram|Alpha right from the comfort of your wave. Robot Address: wave-alpha@appspot.com APIs: Robots Languages: Python Tags: wolfram alpha python regex beautifulsoup urllib2 programming math reference lookup |
Comments (9)
Please make sure your comments are useful and informative.
Suggestions 2
crap... obviously comments don't want to be formatted. Ok, my suggestion was to check the re.match first BEFORE creating a subblip to make sure it actually matches something. If it doesn't (re.match returns None), return straight away, otherwise, you can proceed to create a subblip etc.
Suggestions
Might I suggest changing the following lines: sub_blip = blip.CreateChild() query = re.match('\[(.+)\]', blip.GetDocument().GetText()).group(1) to something like: match_obj = re.match('\[(.+)\]', blip.GetDocument().GetText()) if match_obj is None: return query = match_obj.group(1) sub_blip = blip.CreateChild() ... that way the bot doesn't spam a wave with empty blips all the time. Anyway, fantastic bot! keep up the good work!
Updates
Yeah, there are updates to this program since initial release that are noted in the official robot wavelet. Before posting that something doesn't work, try checking the wavelet for updates. Thanks
Not Responding
+1
Update video!
This works... now that I see searches must be of the form [search terms].