WeatherPlugin
Displays nice weather graphics for a specific location
Introduction
This plugin displays weather information for a specific location. It uses
CPAN:Weather::Com
and requires a free Weather.com subscription (see the Weather::Com manpage).
Syntax Rules
- %WEATHER{City, Country}%
- %WEATHER{Citycode}%
Examples
- %WEATHER{Zurich, Switzerland}%
- %WEATHER{GMXX0040}%
Bugs
- Yes!
- The citycode is only necessary in case you have some non-alphabetic chars in your string, e.g
Frankfurt/Main. I didn't manage to get Weather::Com parse that. So if you have more than one cities with the same name in the country, you'd rather take the city code. Feel free to fix that
Plugin Settings
Plugin settings are stored as preferences variables. To reference a plugin setting write
%<plugin>_<setting>%, i.e.
%WEATHERPLUGIN_SHORTDESCRIPTION%
- One line description, is shown in the TextFormattingRules topic:
- Set SHORTDESCRIPTION = Displays nice weather graphics for a specific location
- Partner ID and License Key (Get them from Weather.com, see Weather::Com manpage (Free of charge))
- Set PARTNERID = 0000000000
- Set LICENSE = fdfdfdfdfdfdfdfd
- Debug plugin: (See output in
data/debug.txt)
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 server where TWiki is running.
- For an automated installation, run the configure script and follow "Find More Extensions" in the in the Extensions section.
- Or, follow these manual installation steps:
- Download the ZIP file from the Plugins home (see below).
- Unzip
WeatherPlugin.zip in your twiki installation directory. Content: | File: | Description: |
data/TWiki/WeatherPlugin.txt | Plugin topic |
lib/TWiki/Plugins/WeatherPlugin.pm | Plugin Perl module |
- Set the ownership of the extracted directories and files to the webserver user.
- Install the dependencies (if any).
- Plugin configuration and testing:
- Run the configure script and enable the plugin in the Plugins section.
- Configure additional plugin settings in the Extensions section if needed.
- Test if the installation was successful:
%WEATHER{Zurich, Switzerland}%
Plugin Info
Related Topics: TWikiPlugins,
UserDocumentationCategory,
TWikiPreferences