-
Notifications
You must be signed in to change notification settings - Fork 0
weather.rb
Weather-of-today plug-in
Records the weather when the diary is first updated for the date and displays it.
Select the "weather.rb" entry from "Plugin selection" view in the "Preference". Please do not forget to push the "OK" button in the bottom.
Then, please follow the "Weahter-of-today" link shown in the "Preference". You have to choose where you take the weather data from and. You might want to use NOAA National Weather Service as follows:
Go to http://weather.noaa.gov/
There you will see weather data for your location. Copy the URL of the page into the first input box.
Afterwards, weather data will be taken from the URL when you append a new date.
The HTML will be like this:
<div class="weather"><span class="weather"><a href="http://weather.noaa.gov/weather/current/EDDM.html">Partly cloudy, 57 deg-F</a> at 14:20</span></div>
You might have to edit the css to show div.weather properly.
- The host of the www server must be able to fetch the with WWW pages.
You have to edit html_string and i_html_string in weather.rb if you want to show more weather data such as wind direction.
You can also specify the @options shown below in the tdiary.conf file in the same directory as tdiary.rb.
If timezone is expricitly specified with TZ environment variable or in the set-up view of weather.rb it will also be recoreded into the weather data.
If the timezone is recorded, the time shown in your diary will not change even if you have moved to another timezone.
Weather data files are created under the directory specified with @options['weather.dir'] or @cache_path/weather/ with filenames: YYYY/YYYYMM.weather. It is a tab-delimited file and you can edit it with a text editor.
Please be careful not to change number of tabs.
Weather data will be acquired when
-
The date of the diary is the same as current date, and
-
The weather data for that date is not yet acquired (or had an error.
-
The weather data provided from the NOAA www page is not too old.
The idea of this plugin is due to hsbt'. The author took the hint for the implmentation from
zoe'. `kotak' kindly provided the information
about NOAA. The author thanks to them.
The author appreciates National Weather Service http://weather.noaa.gov/ making such valuable data available in public domain as described in http://www.noaa.gov/wx.html.
! Copyright of this page
Copyright 2003 tdiary development team
We welcome you to edit and improve this page.
Permission is granted for use, copying, modification, distribution, and distribution of modified versions of this work under the terms of GPL version 2 or later.
Copyright 2003 zunda <zunda at freeshell.org>
Permission is granted for use of copying, modification, distribution, and distribution of modified versions of this work under the terms.