Commit 3c6481bd authored by Philipp's avatar Philipp

Overhauled i18n build process to clean up dist folder and updated examples in...

Overhauled i18n build process to clean up dist folder and updated examples in README.md accordingly...
parent 9fbc165e
......@@ -6,17 +6,9 @@ pages:
- npm install --no-audit
- node_modules/.bin/bower install
- node_modules/.bin/grunt
- node_modules/.bin/grunt --lang=de
- node_modules/.bin/grunt --lang=no
- mv dist.en Rabenwetter.en
- mv dist.de Rabenwetter.de
- mv dist.no Rabenwetter.no
- mv dist.fr Rabenwetter.fr
- mv dist Rabenwetter
artifacts:
paths:
- Rabenwetter.en
- Rabenwetter.de
- Rabenwetter.no
- Rabenwetter.fr
- Rabenwetter
only:
- master
This diff is collapsed.
......@@ -15,9 +15,14 @@ See this skin in action at [rabenwetter.de](https://rabenwetter.de)
## Installation & Configuration
* **Copy `dist.??/*` to a new folder inside your weewx `skins` directory.**
* **Copy `dist/*` to a new folder inside your weewx `skins` directory.**
> **Example:**
> `cp -r template_rabenwetter/dist.en/* /etc/weewx/skins/Rabenwetter/`
> `cp -r template_rabenwetter/dist/* /etc/weewx/skins/Rabenwetter/`
* **Copy localized files and delete i18n folder from installation** (optional)
> **Example:**
> `cp -r template_rabenwetter/dist/de/* /etc/weewx/skins/Rabenwetter/`
> `rm -r /etc/weewx/skins/Rabenwetter/i18n/`
* **Apply supplied patch.**
> **Example:**
......@@ -56,7 +61,7 @@ with this template: https://gitlab.ambhost.net/stimpy/scripts_webcam
* **Extracams (optional)**
At the bottom of the starting page, there's space for three extra images, you
can freely configure at the `skin.conf` file.
If you don't want these extra images, simply comment [Line 67-75](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist.en/skin.conf#L67) from `skin.conf`:
If you don't want these extra images, simply comment [Line 67-75](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist/skin.conf#L67) from `skin.conf`:
```
# extracam1_title = 'Rabenwetter'
# extracam1_img = 'https://www.rabenwetter.de/photocam/rabenberg-hires.jpg'
......@@ -86,21 +91,25 @@ You can either use `git pull` to update your existing clone of the project or do
Either way, continue by:
1. Deleting the skin.conf file from distribution files:
> `rm dist.*/skin.conf`
> `rm dist/skin.conf`
2. Adjusting owner and group (change user and group according to who's running weewx on your system):
> `chown -R weewx:weewx dist.*`
> `chown -R weewx:weewx dist`
3. Copying distribution files for your language to `/etc/weewx/skins/Rabenwetter/` (change paths according to your environment:
> `cp -ar dist.en/* /etc/weewx/skins/Rabenwetter/`
3. Copying global distribution files to `/etc/weewx/skins/Rabenwetter/` (change paths according to your environment:
> `cp -ar dist/* /etc/weewx/skins/Rabenwetter/`
4. Adjusting group of the assets folder to be readable by your webserver (adjust...):
> `chown -R weewx:www-data dist.*/assets/
4. Copying localized files for your language to `/etc/weewx/skins/Rabenwetter/` and deleting `i18n/` from weewx skins directory:
> `cp -ar dist/i18n/en/* /etc/weewx/skins/Rabenwetter/`
> `rm -r /etc/weewx/skins/Rabenwetter/i18n/`
5. Manualy copying assets folder for your language to webroot (adjust...):
> `cp -ar dist.en/assets /var/www/weewx/
5. Adjusting group of the assets folder to be readable by your webserver (adjust...):
> `chown -R weewx:www-data dist/assets/
6. Checking `src/skin.conf` for changes and manually adding them to your `/etc/weewx/skins/Rabenwetter/skin.conf`:
6. Manualy copying assets folder for your language to webroot (adjust...):
> `cp -ar dist/assets /var/www/weewx/
7. Checking `src/skin.conf` for changes and manually adding them to your `/etc/weewx/skins/Rabenwetter/skin.conf`:
> `diff -aur src/skin.conf /etc/weewx/skins/Rabenwetter/skin.conf`
......@@ -117,7 +126,7 @@ information to point you to the right direction:
* **Stop weewx if running:**
> `/etc/init.d/weewx stop`
* **Uncomment [Lines 305-306](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist.en/skin.conf#L305) and [Lines 314-315](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist.en/skin.conf#L314) of your [skin.conf](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist.en/skin.conf):**
* **Uncomment [Lines 305-306](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist/skin.conf#L305) and [Lines 314-315](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist/skin.conf#L314) of your [skin.conf](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist/skin.conf):**
```
[[[adayjson]]]
template = archive/aday-YYYY-MM.json.tmpl
......@@ -139,7 +148,7 @@ So continue watching the logs and
* **Stop weewx again as soon as the export is finished**
> `/etc/init.d/weewx stop`
* **Comment [Lines 305-306](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist.en/skin.conf#L305) and [Lines 314-315](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist.en/skin.conf#L314) of your [skin.conf](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist.en/skin.conf) again:**
* **Comment [Lines 305-306](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist/skin.conf#L305) and [Lines 314-315](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist/skin.conf#L314) of your [skin.conf](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/dist/skin.conf) again:**
```
# [[[adayjson]]]
# template = archive/aday-YYYY-MM.json.tmpl
......@@ -180,30 +189,53 @@ good enough to see, what you're doing without having to render it through
weewx everytime.
### Distribution
Use grunt to create a usable weeWX skin inside the folder `dist.en/`:
Use grunt to create a usable weeWX skin inside the folder `dist/`:
> `~# grunt`
use `--lang` parameter to produce distribution files for other languages
(only "en" and "de" are supported for now):
> `~# grunt --lang=de`
This will produce localized distribution files inside the folder `dist.de/`.
## Translation
I've introduced i18n features to the build process, so you can easily
translate and build localized versions.
Simply copy and rename `src/i18n/en.json` to match your iso 639-1 language code. e.g: `src/i18n/no.json`, then edit and translate its contents.
Simply copy and rename `src/i18n/en.json` to match your iso 639-1 language code. e.g: `src/i18n/fr.json`, then edit and translate its contents.
There's also the humongous forecast file at `src/archive/current.en.json.tmpl`, you may want to translate. Even if you don't want to, you'll have to copy the english version to one matching your countrycode. e.g: `src/archive/current.fr.json.tmpl` or the build process will fail.
The first time, you're adding a new translation, you'll also have to update Gruntfile.js to build the new distribution files:
There's also the humongous forecast file at `src/archive/current.en.json.tmpl`, you may want to translate. Even if you don't want to, you'll have to copy the english version to one matching your countrycode. e.g: `src/archive/current.no.json.tmpl` or the build process will fail.
1. [line 60](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/Gruntfile.js#L60):
`locales: ['de', 'en', 'no'],`
add your language code. e.g:
`locales: ['de', 'en', 'no', 'fr'],`
2. [line 81-86](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/Gruntfile.js#L81):
Copy the lines right below and replace occurences of `.de.` with your language code. e.g: `.fr.`:
```
'src/index.fr.min.html.tmpl': 'src/i18n/fr/index.html.tmpl',
'src/archive.fr.min.html.tmpl': 'src/i18n/fr/archive.html.tmpl',
'src/info.fr.min.html.tmpl': 'src/i18n/fr/info.html.tmpl',
'src/contact.fr.min.html.tmpl': 'src/i18n/fr/contact.html.tmpl',
'src/fullscreen1.fr.min.html.tmpl': 'src/i18n/fr/fullscreen1.html.tmpl',
'src/fullscreen2.fr.min.html.tmpl': 'src/i18n/fr/fullscreen2.html.tmpl',
```
3. [line 201-207](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/Gruntfile.js#L201):
Copy the lines right below and replace occurences of `.en.` with your language code. e.g: `.fr.`:
```
{src: 'src/index.fr.min.html.tmpl', dest: 'dist/i18n/fr/index.html.tmpl'},
{src: 'src/archive.fr.min.html.tmpl', dest: 'dist/i18n/fr/archive.html.tmpl'},
{src: 'src/info.fr.min.html.tmpl', dest: 'dist/i18n/fr/info.html.tmpl'},
{src: 'src/contact.fr.min.html.tmpl', dest: 'dist/i18n/fr/contact.html.tmpl'},
{src: 'src/fullscreen1.fr.min.html.tmpl', dest: 'dist/i18n/fr/fullscreen1.html.tmpl'},
{src: 'src/fullscreen2.fr.min.html.tmpl', dest: 'dist/i18n/fr/fullscreen2.html.tmpl'},
{src: 'src/archive/current.fr.json.tmpl', dest: 'dist/i18n/fr/archive/current.json.tmpl'},
```
The first time, you're adding a new translation, you'll also have to edit the Gruntfile.js and add your new file to the array at [line 60](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/Gruntfile.js#L60):
`locales: ['de', 'en', 'no'],`
When you've done a translation, please also send it to me! I'm happy to add it to the official build!
### Contributors
All translations other than english and german were done by users of this template all over the world.
......
This diff is collapsed.
This diff is collapsed.
#errorCatcher Echo
#set $YM="%Y %m"
#set $D=" %d"
#set $M=" %b"
#set $Time=" %H:%M"
#set $NODAY=" N/A"
#set $Temp="%6.1f"
#set $Wind="%6.1f"
#set $Dir="%6.0f"
#set $Count="%6d"
#set $NONE=" N/A"
#if $unit.unit_type_dict.group_rain == "mm"
#set $Rain="%6.1f"
#else
#set $Rain="%6.2f"
#end if
MONTHLY CLIMATOLOGICAL SUMMARY for $month_name $year_name
NAME: $station.location
ELEV: $station.altitude LAT: $station.latitude[0]-$station.latitude[1] $station.latitude[2] LONG: $station.longitude[0]-$station.longitude[1] $station.longitude[2]
TEMPERATURE ($unit.label.outTemp.strip()), RAIN ($unit.label.rain.strip()), WIND SPEED ($unit.label.windSpeed.strip())
HEAT COOL AVG
MEAN DEG DEG WIND DOM
DAY TEMP HIGH TIME LOW TIME DAYS DAYS RAIN SPEED HIGH TIME DIR
---------------------------------------------------------------------------------------
#for $day in $month.days
#if $day.barometer.count.raw
$day.dateTime.format($D) $day.outTemp.avg.nolabel($Temp,$NONE) $day.outTemp.max.nolabel($Temp,$NONE) $day.outTemp.maxtime.format($Time) $day.outTemp.min.nolabel($Temp,$NONE) $day.outTemp.mintime.format($Time) $day.heatdeg.sum.nolabel($Temp,$NONE) $day.cooldeg.sum.nolabel($Temp,$NONE) $day.rain.sum.nolabel($Rain,$NONE) $day.wind.avg.nolabel($Wind,$NONE) $day.wind.max.nolabel($Wind,$NONE) $day.wind.maxtime.format($Time) $day.wind.vecdir.nolabel($Dir,$NONE)
#else
$day.dateTime.format($D)
#end if
#end for
---------------------------------------------------------------------------------------
$month.outTemp.avg.nolabel($Temp,$NONE) $month.outTemp.max.nolabel($Temp,$NONE) $month.outTemp.maxtime.format($D) $month.outTemp.min.nolabel($Temp,$NONE) $month.outTemp.mintime.format($D) $month.heatdeg.sum.nolabel($Temp,$NONE) $month.cooldeg.sum.nolabel($Temp,$NONE) $month.rain.sum.nolabel($Rain,$NONE) $month.wind.avg.nolabel($Wind,$NONE) $month.wind.max.nolabel($Wind,$NONE) $month.wind.maxtime.format($D) $month.wind.vecdir.nolabel($Dir)
#errorCatcher Echo
#set $YM="%Y %m"
#set $D=" %d"
#set $M=" %b"
#set $NODAY=" N/A"
#set $Temp="%6.1f"
#set $Wind="%6.1f"
#set $Dir="%6.0f"
#set $Count="%6d"
#set $NONE=" N/A"
#if $unit.unit_type_dict.group_temperature == "degree_F"
#set $Hot =(90.0,"degree_F")
#set $Cold =(32.0,"degree_F")
#set $VeryCold=(0.0, "degree_F")
#else
#set $Hot =(30.0,"degree_C")
#set $Cold =(0.0,"degree_C")
#set $VeryCold=(-20.0,"degree_C")
#end if
#if $unit.unit_type_dict.group_rain == "inch"
#set $Trace =(0.01,"inch")
#set $SomeRain =(0.1, "inch")
#set $Soak =(1.0, "inch")
#set $Rain="%6.2f"
#elif $unit.unit_type_dict.group_rain == "mm"
#set $Trace =(.3, "mm")
#set $SomeRain =(3, "mm")
#set $Soak =(30.0,"mm")
#set $Rain="%6.1f"
#else
#set $Trace =(.03,"cm")
#set $SomeRain =(.3, "cm")
#set $Soak =(3.0,"cm")
#set $Rain="%6.2f"
#end if
#def ShowInt($T)
$("%6d" % $T[0])#slurp
#end def
#def ShowFloat($R)
$("%6.2f" % $R[0])#slurp
#end def
CLIMATOLOGICAL SUMMARY for year $year_name
NAME: $station.location
ELEV: $station.altitude LAT: $station.latitude[0]-$station.latitude[1] $station.latitude[2] LONG: $station.longitude[0]-$station.longitude[1] $station.longitude[2]
TEMPERATURE ($unit.label.outTemp.strip())
HEAT COOL MAX MAX MIN MIN
MEAN MEAN DEG DEG >= <= <= <=
YR MO MAX MIN MEAN DAYS DAYS HI DAY LOW DAY $ShowInt($Hot) $ShowInt($Cold) $ShowInt($Cold) $ShowInt($VeryCold)
------------------------------------------------------------------------------------------------
#for $month in $year.months
#if $month.barometer.count.raw
$month.dateTime.format($YM) $month.outTemp.meanmax.nolabel($Temp,$NONE) $month.outTemp.meanmin.nolabel($Temp,$NONE) $month.outTemp.avg.nolabel($Temp,$NONE) $month.heatdeg.sum.nolabel($Temp,$NONE) $month.cooldeg.sum.nolabel($Temp,$NONE) $month.outTemp.max.nolabel($Temp,$NONE) $month.outTemp.maxtime.format($D,$NODAY) $month.outTemp.min.nolabel($Temp,$NONE) $month.outTemp.mintime.format($D,$NODAY) $month.outTemp.max_ge($Hot).nolabel($Count,$NONE) $month.outTemp.max_le($Cold).nolabel($Count,$NONE) $month.outTemp.min_le($Cold).nolabel($Count,$NONE) $month.outTemp.min_le($VeryCold).nolabel($Count,$NONE)
#else
$month.dateTime.format($YM)
#end if
#end for
------------------------------------------------------------------------------------------------
$year.outTemp.meanmax.nolabel($Temp,$NONE) $year.outTemp.meanmin.nolabel($Temp,$NONE) $year.outTemp.avg.nolabel($Temp,$NONE) $year.heatdeg.sum.nolabel($Temp,$NONE) $year.cooldeg.sum.nolabel($Temp,$NONE) $year.outTemp.max.nolabel($Temp,$NONE) $year.outTemp.maxtime.format($M,$NODAY) $year.outTemp.min.nolabel($Temp,$NONE) $year.outTemp.mintime.format($M,$NODAY) $year.outTemp.max_ge($Hot).nolabel($Count,$NONE) $year.outTemp.max_le($Cold).nolabel($Count,$NONE) $year.outTemp.min_le($Cold).nolabel($Count,$NONE) $year.outTemp.min_le($VeryCold).nolabel($Count,$NONE)
PRECIPITATION ($unit.label.rain.strip())
MAX ---DAYS OF RAIN---
OBS. OVER
YR MO TOTAL DAY DATE $ShowFloat(Trace) $ShowFloat($SomeRain) $ShowFloat($Soak)
------------------------------------------------
#for $month in $year.months
#if $month.barometer.count.raw
$month.dateTime.format($YM) $month.rain.sum.nolabel($Rain,$NONE) $month.rain.maxsum.nolabel($Rain,$NONE) $month.rain.maxsumtime.format($D,$NODAY) $month.rain.sum_ge($Trace).nolabel($Count,$NONE) $month.rain.sum_ge($SomeRain).nolabel($Count,$NONE) $month.rain.sum_ge($Soak).nolabel($Count,$NONE)
#else
$month.dateTime.format($YM)
#end if
#end for
------------------------------------------------
$year.rain.sum.nolabel($Rain,$NONE) $year.rain.maxsum.nolabel($Rain,$NONE) $year.rain.maxsumtime.format($M,$NODAY) $year.rain.sum_ge($Trace).nolabel($Count,$NONE) $year.rain.sum_ge($SomeRain).nolabel($Count,$NONE) $year.rain.sum_ge($Soak).nolabel($Count,$NONE)
WIND SPEED ($unit.label.windSpeed.strip())
DOM
YR MO AVG HI DATE DIR
-----------------------------------
#for $month in $year.months
#if $month.barometer.count.raw
$month.dateTime.format($YM) $month.wind.avg.nolabel($Wind,$NONE) $month.wind.max.nolabel($Wind,$NONE) $month.wind.maxtime.format($D,$NODAY) $month.wind.vecdir.nolabel($Dir,$NONE)
#else
$month.dateTime.format($YM)
#end if
#end for
-----------------------------------
$year.wind.avg.nolabel($Wind,$NONE) $year.wind.max.nolabel($Wind,$NONE) $year.wind.maxtime.format($M,$NODAY) $year.wind.vecdir.nolabel($Dir,$NONE)
<?xml version="1.0"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" >
<channel>
<title>$station.location, Weather Conditions</title>
<link>$station.station_url</link>
<description>Current conditions, and daily, monthly, and yearly summaries</description>
<language>en-us</language>
<pubDate>$current.dateTime.format("%a, %d %b %Y %H:%M:%S %Z")</pubDate>
<lastBuildDate>$current.dateTime.format("%a, %d %b %Y %H:%M:%S %Z")</lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>weewx $station.version</generator>
<ttl>$current.interval.string('')</ttl>
<item>
<title>Weather Conditions at $current.dateTime</title>
<link>$station.station_url</link>
<description>
Outside temperature: $current.outTemp;
Barometer: $current.barometer;
Wind: $current.windSpeed from $current.windDir;
Rain rate: $current.rainRate;
Inside temperature: $current.inTemp
</description>
<pubDate>$current.dateTime.format("%a, %d %b %Y %H:%M:%S %Z")</pubDate>
<geo:lat>$station.latitude_f</geo:lat>
<geo:long>$station.longitude_f</geo:long>
<content:encoded><![CDATA[
<p>
Time: $current.dateTime<br/>
Outside Temperature: $current.outTemp<br/>
Inside Temperature: $current.inTemp<br/>
Wind Chill: $current.windchill<br/>
Heat Index: $current.heatindex<br/>
Dewpoint: $current.dewpoint<br/>
Humidity: $current.outHumidity<br/>
Barometer: $current.barometer<br/>
Wind: $current.windSpeed from $current.windDir<br/>
Rain Rate: $current.rainRate<br/>
</p>
]]></content:encoded>
</item>
<item>
<title>Daily Weather Summary as of $current.dateTime</title>
<link>$station.station_url</link>
<description>
Min outside temperature: $day.outTemp.min at $day.outTemp.mintime;
Max outside temperature: $day.outTemp.max at $day.outTemp.maxtime;
Min inside temperature: $day.inTemp.min at $day.inTemp.mintime;
Max inside temperature: $day.inTemp.max at $day.inTemp.maxtime;
Min barometer: $day.barometer.min at $day.barometer.mintime;
Max barometer: $day.barometer.max at $day.barometer.maxtime;
Max wind : $day.wind.max from $day.wind.gustdir at $day.wind.maxtime;
Rain today: $day.rain.sum
</description>
<pubDate>$current.dateTime.format("%a, %d %b %Y %H:%M:%S %Z")</pubDate>
<geo:lat>$station.latitude_f</geo:lat>
<geo:long>$station.longitude_f</geo:long>
<content:encoded><![CDATA[
<p>
Day: $day.dateTime.format("%d %b %Y")<br/>
Min Outside Temperature: $day.outTemp.min at $day.outTemp.mintime<br/>
Max Outside Temperature: $day.outTemp.max at $day.outTemp.maxtime<br/>
Min Inside Temperature: $day.inTemp.min at $day.inTemp.mintime<br/>
Max Inside Temperature: $day.inTemp.max at $day.inTemp.maxtime<br/>
Min Barometer: $day.barometer.min at $day.barometer.mintime<br/>
Max Barometer: $day.barometer.max at $day.barometer.maxtime<br/>
Max Wind : $day.wind.max from $day.wind.gustdir at $day.wind.maxtime<br/>
Rain today: $day.rain.sum<br/>
</p>
]]></content:encoded>
</item>
<item>
<title>Monthly Weather Summary as of $current.dateTime</title>
<link>$station.station_url/month.html</link>
<description>
Min outside temperature: $month.outTemp.min at $month.outTemp.mintime;
Max outside temperature: $month.outTemp.max at $month.outTemp.maxtime;
Min inside temperature: $month.inTemp.min at $month.inTemp.mintime;
Max inside temperature: $month.inTemp.max at $month.inTemp.maxtime;
Min barometer: $month.barometer.min at $month.barometer.mintime;
Max barometer: $month.barometer.max at $month.barometer.maxtime;
Max wind : $month.wind.max from $month.wind.gustdir at $month.wind.maxtime;
Rain total for month: $month.rain.sum
</description>
<pubDate>$current.dateTime.format("%a, %d %b %Y %H:%M:%S %Z")</pubDate>
<content:encoded><![CDATA[
<p>
Month: $month.dateTime.format("%B %Y")<br/>
Max Outside Temperature: $month.outTemp.max at $month.outTemp.maxtime<br/>
Min Outside Temperature: $month.outTemp.min at $month.outTemp.mintime<br/>
Max Inside Temperature: $month.inTemp.max at $month.inTemp.maxtime<br/>
Min Inside Temperature: $month.inTemp.min at $month.inTemp.mintime<br/>
Min Barometer: $month.barometer.min at $month.barometer.mintime<br/>
Max Barometer: $month.barometer.max at $month.barometer.maxtime<br/>
Max Wind : $month.wind.max from $month.wind.gustdir at $month.wind.maxtime<br/>
Rain total for month: $month.rain.sum<br/>
</p>
]]></content:encoded>
</item>
<item>
<title>Yearly Weather Summary as of $current.dateTime</title>
<link>$station.station_url/year.html</link>
<description>
Min outside temperature: $year.outTemp.min at $year.outTemp.mintime;
Max outside temperature: $year.outTemp.max at $year.outTemp.maxtime;
Min inside temperature: $year.inTemp.min at $year.inTemp.mintime;
Max inside temperature: $year.inTemp.max at $year.inTemp.maxtime;
Min barometer: $year.barometer.min at $year.barometer.mintime;
Max barometer: $year.barometer.max at $year.barometer.maxtime;
Max wind : $year.wind.max from $year.wind.gustdir at $year.wind.maxtime;
Rain total for year: $year.rain.sum
</description>
<pubDate>$current.dateTime.format("%a, %d %b %Y %H:%M:%S %Z")</pubDate>
<content:encoded><![CDATA[
<p>
Year: $year.dateTime.format("%Y")<br/>
Max Outside Temperature: $year.outTemp.max at $year.outTemp.maxtime<br/>
Min Outside Temperature: $year.outTemp.min at $year.outTemp.mintime<br/>
Max Inside Temperature: $year.inTemp.max at $year.inTemp.maxtime<br/>
Min Inside Temperature: $year.inTemp.min at $year.inTemp.mintime<br/>
Min Barometer: $year.barometer.min at $year.barometer.mintime<br/>
Max Barometer: $year.barometer.max at $year.barometer.maxtime<br/>
Max Wind : $year.wind.max from $year.wind.gustdir at $year.wind.maxtime<br/>
Rain total for year: $year.rain.sum<br/>
</p>
]]></content:encoded>
</item>
</channel>
</rss>
#import datetime
#encoding UTF-8
#for $d in $month.days
[
#for $h in $d.hours
{ "dateTime": "$h.dateTime.format("%H:%M")",
#if $h.inTemp.has_data
"inTemp": $h.inTemp.avg.formatted.replace(",", "."),
#else
"inTemp": null,
#end if
#if $h.outTemp.has_data
"outTemp": $h.outTemp.avg.formatted.replace(",", "."),
"outTempTL": $h.outTemp.min.formatted.replace(",", "."),
"outTempTH": $h.outTemp.max.formatted.replace(",", "."),
#else
"outTemp": null,
"outTempTL": null,
"outTempTH": null,
#end if
#if $h.dewpoint.has_data
"dewpoint": $h.dewpoint.avg.formatted.replace(",", "."),
"dewpointTL": $h.dewpoint.min.formatted.replace(",", "."),
"dewpointTH": $h.dewpoint.max.formatted.replace(",", "."),
#else
"dewpoint": null,
"dewpointTL": null,
"dewpointTH": null,
#end if
#if $h.windchill.has_data
"windChill": $h.windchill.avg.formatted.replace(",", "."),
"windChillTL": $h.windchill.min.formatted.replace(",", "."),
#else
"windChill": null,
"windChillTL": null,
#end if
#if $h.heatindex.has_data
"heatIndex": $h.heatindex.avg.formatted.replace(",", "."),
"heatIndexTH": $h.heatindex.max.formatted.replace(",", "."),
#else
"heatIndex": null,
"heatIndexTH": null,
#end if
#if $h.windSpeed.has_data
"windSpeed": $h.windSpeed.avg.formatted.replace(",", "."),
"windSpeedTH": $h.windSpeed.max.formatted.replace(",", "."),
#else
"windSpeed": null,
"windSpeedTH": null,
#end if
#if $h.windDir.has_data
"windDirection": $h.windDir.avg.formatted.replace(",", "."),
#else
"windDirection": null,
#end if
#if $h.barometer.has_data
"pressure": $h.barometer.avg.formatted.replace(",", "."),
"pressureTL": $h.barometer.min.formatted.replace(",", "."),
"pressureTH": $h.barometer.max.formatted.replace(",", "."),
#else
"pressure": null,
"pressureTL": null,
"pressureTH": null,
#end if
#if $h.rain.has_data
"rain": $h.rain.sum.formatted.replace(",", "."),
#else
"rain": null,
#end if
#if $h.rainRate.has_data
"rainrate": $h.rainRate.avg.formatted.replace(",", "."),
"rainrateTH": $h.rainRate.max.formatted.replace(",", "."),
#else
"rainrate": null,
"rainrateTH": null,
#end if
#if $h.outHumidity.has_data
"outHumidity": $h.outHumidity.avg.formatted.replace(",", "."),
"outHumidityTL": $h.outHumidity.min.formatted.replace(",", "."),
"outHumidityTH": $h.outHumidity.max.formatted.replace(",", "."),
#else
"outHumidity": null,
"outHumidityTL": null,
"outHumidityTH": null,
#end if
#if $h.inHumidity.has_data
"inHumidity": $h.inHumidity.avg.formatted.replace(",", "."),
"inHumidityTL": $h.inHumidity.min.formatted.replace(",", "."),
"inHumidityTH": $h.inHumidity.max.formatted.replace(",", "."),
#else
"inHumidity": null,
"inHumidityTL": null,
"inHumidityTH": null,
#end if
#if $h.PM10.has_data
"PM10": $h.PM10.avg.nolabel("%.2f").replace(",", "."),
"PM25": $h.PM25.avg.nolabel("%.2f").replace(",", ".") },
#else
"PM10": null,
"PM25": null },
#end if
#end for
{}
]
#end for
#import datetime
#encoding UTF-8
#for $m in $year.months
[
#for $d in $m.days
{ "dateTime": "$d.dateTime.format("%d.")",
#if $d.inTemp.avg.formatted != "0"
"inTemp": $d.inTemp.avg.formatted.replace(",", "."),
"outTemp": $d.outTemp.avg.formatted.replace(",", "."),
"outTempTL": $d.outTemp.min.formatted.replace(",", "."),
"outTempTH": $d.outTemp.max.formatted.replace(",", "."),
"dewpoint": $d.dewpoint.avg.formatted.replace(",", "."),
"dewpointTL": $d.dewpoint.min.formatted.replace(",", "."),
"dewpointTH": $d.dewpoint.max.formatted.replace(",", "."),
"windChill": $d.windchill.avg.formatted.replace(",", "."),
"windChillTL": $d.windchill.min.formatted.replace(",", "."),
"heatIndex": $d.heatindex.avg.formatted.replace(",", "."),
"heatIndexTH": $d.heatindex.max.formatted.replace(",", "."),
"windSpeed": $d.windSpeed.avg.formatted.replace(",", "."),
"windSpeedTH": $d.windSpeed.max.formatted.replace(",", "."),
"windDirection": $d.windDir.avg.formatted.replace(",", "."),
"pressure": $d.barometer.avg.formatted.replace(",", "."),
"pressureTL": $d.barometer.min.formatted.replace(",", "."),
"pressureTH": $d.barometer.max.formatted.replace(",", "."),
"rain": $d.rain.sum.formatted.replace(",", "."),
"rainrate": $d.rainRate.avg.formatted.replace(",", "."),
"rainrateTH": $d.rainRate.max.formatted.replace(",", "."),
"outHumidity": $d.outHumidity.avg.formatted.replace(",", "."),
"outHumidityTL": $d.outHumidity.min.formatted.replace(",", "."),
"outHumidityTH": $d.outHumidity.max.formatted.replace(",", "."),
"inHumidity": $d.inHumidity.avg.formatted.replace(",", "."),
"inHumidityTL": $d.inHumidity.min.formatted.replace(",", "."),
"inHumidityTH": $d.inHumidity.max.formatted.replace(",", "."),
"PM10": $d.PM10.avg.nolabel("%.2f").replace(",", "."),
"PM25": $d.PM25.avg.nolabel("%.2f").replace(",", ".") },
#else
"inTemp": null,
"outTemp": null,
"outTempTL": null,
"outTempTH": null,
"dewpoint": null,
"dewpointTL": null,
"dewpointTH": null,
"windChill": null,
"windChillTL": null,
"heatIndex": null,
"heatIndexTH": null,
"windSpeed": null,
"windSpeedTH": null,
"windDirection": null,
"pressure": null,
"pressureTL": null,
"pressureTH": null,