Notices where this attachment appears
-
WeatherBot (https://hub.polari.us/weather) can now take various request forms. Sending this:New York,NY,US orNew York,US results in the original behavior - you get the current conditions. Sending any of these:Current conditions in Jefferson City,MO,USCurrently Uppsala,SECurrent in London,UKConditions for Moscow,RUetc. also results in the current conditions. But sending any of these:Forecast for London,UKForecast in Dallas,TX,US will return a table of forecast data for the city in question, going out 3 days. This is just a first attempt to do simple request processing based on language, and, yes, it's only in English for now. But now you can at least get a forecast! Enjoy. Code will be updated on the wiki shortly. http://polari.us/dokuwiki/doku.php?id=weatherbot
-
Just added a little extra code to WeatherBot to better handle the fact that some clients send HTML to pump.io in one formatting (e.g. only paragraph tags), while others do it differently. I didn't want to have to write a smart HTML-to-PLAIN parser, so I just employed lynx to do it for me. I updated the code and added mention of this dependency. I updated the regular expression pattern search accordingly. http://polari.us/dokuwiki/doku.php?id=weatherbot "http://polari.us/dokuwiki/doku.php?id=weatherbot
-
Source code for current beta version of the Weather Bot script: http://polari.us/dokuwiki/doku.php?id=weatherbot (distributed under Apache 2.0 license)