component1Add my vote for this tag create new tag
, view all tags

GoogleWeatherPlugin -- OBSOLETE, Replaced By WundergroundPlugin

Google has discontinued the API that this plugin relied upon.

Failures may show up as 'Unspecified error' for the topic text as the XML parser throws an unhandled exception.

Disable the plugin, then it should be possible to edit the topic and remove the %<nop>WEATHER% variable.

Provides weather forecast for a specified place.

Syntax Rules

%WEATHER{"5-digit-zip" options...}%

%WEATHER{"City, State" options...}%

%WEATHER{"City, Country" options...}%

Expands to the weather forecast obtained from Google's weather API for the specified place as a table.

The Google API is querried at most every 15 minutes for the same data to avoid exceeding Google's rate limit. Cached data is served between querries.


Options are specified in the usual format -- each option is of the form name="value'', where the quotes are required. multiple options are separated by spaces.


Specifies the language code to be supplied to google. See the Weather::Google documentation for the list of supported languages. Default is "en". The language code seems also to effect the units (SI or US), so it's more of a locale.


Specifies whether or not to include the place name and forecast time before the table. Default is true.


Specifies a string to be passed to the %TABLE% directive of the TablePlugin. May be used to customize the formatting of the table. Note that doublequotes must be escaped with a backslash.


Specifies the timezone to be used to display the forecast time. Specify as a string acceptable to DateTime::TimeZone, such as "US/Mountain". The timezone of the place and the timezone of the user are reasonable choices. The default is UTC.


Specifies the display format for the forecast time. Specify as a string acceptable to strftime. Default is "%a %d-%b-%Y %H %M %Z".


Specifies how many days beyond current conditions to forecast. 0 means the rest of today. 1 will include tomorrow. The maximum value is 4 (a Weather::Google limit).


  • Although Google returns strings according to the language parameter, text generated by the plugin does not.
  • %WEATHER% can not be embedded in a TML table (work-around is to embed in an HTML table).


%WEATHER{"85003" tz="US/Mountain"}% %WEATHER{"85003" tz="US/Mountain"}%

%WEATHER{"London, England" tableattributes="tableframe=\"border\"" future="0" tz="GMT"}% %WEATHER{"London, England" tableattributes="tableframe=\"border\"" future="0" tz="GMT"}%

%WEATHER{"Paris, France" language="fr" tableattributes="databg=\"none\"" heading="1" future="4" tz="Europe/Paris"}%
%WEATHER{"Paris, France" language="fr" tableattributes="databg=\"none\"" heading="1" future="4" tz="Europe/Paris"}%

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %NEWPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Weather forecast from google

This plugin currently has no settings.

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server.

  • Download the ZIP file from the Plugin Home (see below)
  • Unzip GoogleWeatherPlugin.zip in your twiki installation directory. Content:
File: Description:
data/TWiki/GoogleWeatherPlugin.txt Plugin topic
data/TWiki/GoogleWeatherPlugin.txt,v Plugin topic repository
lib/TWiki/Plugins/GoogleWeatherPlugin.pm Plugin Perl module
  • Configure the Plugin:
    • TWiki 4.0 and up: Run the configure script to enable the Plugin
    • Change the Plugin settings as needed

Plugin Info

Plugin Author: TWiki:Main.TimotheLitt
Copyright: 2010, TWiki:Main.TimotheLitt
License: GPL ( GNU General Public License)
Plugin Version: 06 Jan 2010 (V1.001)
Change History:
06 Jan 2010 1.01 Typos on this page, suppress sorting of output, add alt tags to icons & implement cache
05 Jan 2010 Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.1
CPAN Dependencies: CPAN:Weather::Google CPAN:DateTime CPAN:DateTime::Format::HTTP CPAN:Data::Serializer
Other Dependencies: none
Perl Version: 5.008
Benchmarks: GoodStyle nn%, FormattedSearch nn%, GoogleWeatherPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/GoogleWeatherPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/GoogleWeatherPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/GoogleWeatherPluginAppraisal
Related Topics: TWikiPlugins, DeveloperDocumentationCategory, AdminDocumentationCategory, TWikiPreferences

-- TWiki:Main.TimotheLitt - 05 Jan 2010

Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivezip GoogleWeatherPlugin.zip r1 manage 8.8 K 2010-01-06 - 15:12 TimotheLitt V1.001 Plugin installation kit
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2014-01-13 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2015 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.