Wunderbot Update

This is a quick update to announce that my Wunderground bot plugin for StatusNet has gotten a couple of new features since it's initial release.

The first one is that if a US zip code or Canadian postal code isn't supplied in the notice to the bot, it'll attempt to get the users location from the notice. This info is attached to the notice only if it has been allowed by the user (it may be turned on by default, I can't quite remember). To turn it on, you have to check the "Share my current location when posting notices" checkbox in the settings (i.e. http://identi.ca/settings/profile) and put a valid location in the Location field. Another option is to have your browser or client (some clients such as Mustard have this option) attach the location information. If the notice has the location information (which is in latitude/longitude format), the bot will pass the lat/long to the Wunderground API and it'll return the current conditions appropriately. One thing to note is that the bot will use a provided postal code before it'll use any location attached to the notice.

I now support forecasts. Send me a notice with the term 'forecast' and your postal code (US/CAN) and I'll give you today's forecast.

Niobe (niobe)'s status on Thursday, 20-Sep-12 13:58:19 CDT - matrix.jpope.org

Yep, as @niobe said, the second new feature is that the bot can now return forecast information. I currently have it set to do either the current or the next day forecasts separately and I am debating on adding a full three day forecast option. The reason to keep the days split is so that the forecast notices do get too long character wise. I have no limit set on matrix.jpope.org but, some folks on smaller character instances have issues seeing the full notice sometimes with the longer notices. To use the forecast option, send the bot a notice that contains the word 'forecast'. Again, putting a postal code in as needed, the forecast option will also attempt to get the location from the notice as needed. You can also add the word 'tomorrow' to your notice to the bot and it'll return tomorrows forecast otherwise, it'll return today's.

That's all that I've currently added, you can check the code out at Gitorious. Beware, it needs some cleanup and is still quite the work in progress.

@jpope Thursday forecast for Jefferson City. Partly Cloudy High: 81 F (27 C) Low: 54 F (12 C)Precip Chance: 10% #partlycloudy.

Niobe (niobe)'s status on Thursday, 20-Sep-12 13:48:03 CDT - matrix.jpope.org

Have a response to this post? Please use this link.