Commit 83e35892 authored by Philipp's avatar Philipp

fixed unquoted strings in json files preventing archive from loading under some circumstances

parent d91536cf
Copyright 2018 Philipp Giebel <info@ambnet.biz>
Copyright 2018-2019 Philipp Giebel <info@rabenwetter.de>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
This diff is collapsed.
......@@ -2,71 +2,131 @@
#encoding UTF-8
[
#for $d in $month.days
{ "dateTime": "$d.dateTime.format("%d.")",
#if $d.barometer.avg.formatted != "0"
{ "dateTime": "$d.dateTime.format("%d.")",
#if $d.inTemp.avg.has_data
"inTemp": $d.inTemp.avg.formatted.replace(",", "."),
"inTempTL": $d.inTemp.min.formatted.replace(",", "."),
"inTempTH": $d.inTemp.max.formatted.replace(",", "."),
#else
"inTemp": null,
"inTempTL": null,
"inTempTH": null,
#end if
#if $d.outTemp.avg.has_data
"outTemp": $d.outTemp.avg.formatted.replace(",", "."),
"outTempTL": $d.outTemp.min.formatted.replace(",", "."),
"outTempTH": $d.outTemp.max.formatted.replace(",", "."),
#else
"outTemp": null,
"outTempTL": null,
"outTempTH": null,
#end if
#if $trend($time_delta=86400).outTemp.has_data
"tempTrend": "$trend($time_delta=86400).outTemp.nolabel("%+.1f").replace(",", ".")",
#else
"tempTrend": "0",
#end if
#if $d.dewpoint.avg.has_data
"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.windGust.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(",", "."),
#if $month.PM10.has_data
"PM10": $d.PM10.avg.nolabel("%.2f").replace(",", "."),
#end if
#if $month.PM25.has_data
"PM25": $d.PM25.avg.nolabel("%.2f").replace(",", ".") },
#else
"foo": "" },
#end if
#else
"inTemp": null,
"outTemp": null,
"outTempTL": null,
"outTempTH": null,
#else
"dewpoint": null,
"dewpointTL": null,
"dewpointTH": null,
#end if
#if $d.windchill.avg.has_data
"windChill": $d.windchill.avg.formatted.replace(",", "."),
"windChillTL": $d.windchill.min.formatted.replace(",", "."),
#else
"windChill": null,
"windChillTL": null,
#end if
#if $d.heatindex.avg.has_data
"heatIndex": $d.heatindex.avg.formatted.replace(",", "."),
"heatIndexTH": $d.heatindex.max.formatted.replace(",", "."),
#else
"heatIndex": null,
"heatIndexTH": null,
#end if
#if $d.windSpeed.avg.has_data
"windSpeed": $d.windSpeed.avg.formatted.replace(",", "."),
#else
"windSpeed": null,
#end if
#if $d.windGust.avg.has_data
"windSpeedTH": $d.windGust.max.formatted.replace(",", "."),
#else
"windSpeedTH": null,
#end if
#if $d.windDir.avg.has_data
"windDirection": $d.windDir.avg.formatted.replace(",", "."),
"windText": "$d.windDir.avg.ordinal_compass",
#else
"windDirection": null,
"windText": "N/A",
#end if
#if $d.barometer.avg.has_data
"pressure": $d.barometer.avg.formatted.replace(",", "."),
"pressureTL": $d.barometer.min.formatted.replace(",", "."),
"pressureTH": $d.barometer.max.formatted.replace(",", "."),
#else
"pressure": null,
"pressureTL": null,
"pressureTH": null,
#end if
#if $trend($time_delta=86400).pressure.has_data
"pressureTrend": "$trend($time_delta=86400).pressure.nolabel("%+.1f").replace(",", ".")",
#else
"pressureTrend": null,
#end if
#if $d.rain.avg.has_data
"rain": $d.rain.sum.formatted.replace(",", "."),
#else
"rain": null,
#end if
#if $d.rainRate.avg.has_data
"rainrate": $d.rainRate.avg.formatted.replace(",", "."),
"rainrateTH": $d.rainRate.max.formatted.replace(",", "."),
#else
"rainrate": null,
"rainrateTH": null,
#end if
#if $d.outHumidity.avg.has_data
"outHumidity": $d.outHumidity.avg.formatted.replace(",", "."),
"outHumidityTL": $d.outHumidity.min.formatted.replace(",", "."),
"outHumidityTH": $d.outHumidity.max.formatted.replace(",", "."),
#else
"outHumidity": null,
"outHumidityTL": null,
"outHumidityTH": null,
"inHumidity": null,
"inHumidityTL": null,
"inHumidityTH": null,
#end if
#if $d.inHumidity.avg.has_data
"inHumidity": $d.inHumidity.avg.formatted.replace(",", "."),
"inHumidityTL": $d.inHumidity.min.formatted.replace(",", "."),
"inHumidityTH": $d.inHumidity.max.formatted.replace(",", "."),
#else
"inHumidity": null,
"inHumidityTL": null,
"inHumidityTH": null,
#end if
#if $d.PM10.avg.has_data
"PM10": $d.PM10.avg.nolabel("%.2f").replace(",", "."),
"PM10TH": $d.PM10.max.nolabel("%.2f").replace(",", "."),
"PM10TL": $d.PM10.min.nolabel("%.2f").replace(",", "."),
#else
"PM10": null,
"PM25": null },
"PM10TH": null,
"PM10TL": null,
#end if
#if $d.PM25.avg.has_data
"PM25": $d.PM25.avg.nolabel("%.2f").replace(",", "."),
"PM25TH": $d.PM25.max.nolabel("%.2f").replace(",", "."),
"PM25TL": $d.PM25.min.nolabel("%.2f").replace(",", ".") },
#else
"PM25": null,
"PM25TH": null,
"PM25TL": null },
#end if
#end for
{}
......
......@@ -2,72 +2,132 @@
#encoding UTF-8
[
#for $d in $week.days
{ "dateTime": "$d.dateTime.format("%a")",
#if $d.barometer.avg.formatted != "0"
{ "dateTime": "$d.dateTime.format("%a")",
#if $d.inTemp.avg.has_data
"inTemp": $d.inTemp.avg.formatted.replace(",", "."),
"inTempTL": $d.inTemp.min.formatted.replace(",", "."),
"inTempTH": $d.inTemp.max.formatted.replace(",", "."),
#else
"inTemp": null,
"inTempTL": null,
"inTempTH": null,
#end if
#if $d.outTemp.avg.has_data
"outTemp": $d.outTemp.avg.formatted.replace(",", "."),
"outTempTL": $d.outTemp.min.formatted.replace(",", "."),
"outTempTH": $d.outTemp.max.formatted.replace(",", "."),
#else
"outTemp": null,
"outTempTL": null,
"outTempTH": null,
#end if
#if $trend($time_delta=86400).outTemp.has_data
"tempTrend": "$trend($time_delta=86400).outTemp.nolabel("%+.1f").replace(",", ".")",
#else
"tempTrend": "0",
#end if
#if $d.dewpoint.avg.has_data
"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.windGust.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(",", "."),
#if $week.PM10.has_data
"PM10": $d.PM10.avg.nolabel("%.2f").replace(",", "."),
#end if
#if $week.PM25.has_data
"PM25": $d.PM25.avg.nolabel("%.2f").replace(",", ".") },
#else
"foo": "" },
#end if
#else
"inTemp": null,
"outTemp": null,
"outTempTL": null,
"outTempTH": null,
#else
"dewpoint": null,
"dewpointTL": null,
"dewpointTH": null,
#end if
#if $d.windchill.avg.has_data
"windChill": $d.windchill.avg.formatted.replace(",", "."),
"windChillTL": $d.windchill.min.formatted.replace(",", "."),
#else
"windChill": null,
"windChillTL": null,
#end if
#if $d.heatindex.avg.has_data
"heatIndex": $d.heatindex.avg.formatted.replace(",", "."),
"heatIndexTH": $d.heatindex.max.formatted.replace(",", "."),
#else
"heatIndex": null,
"heatIndexTH": null,
#end if
#if $d.windSpeed.avg.has_data
"windSpeed": $d.windSpeed.avg.formatted.replace(",", "."),
#else
"windSpeed": null,
#end if
#if $d.windGust.avg.has_data
"windSpeedTH": $d.windGust.max.formatted.replace(",", "."),
#else
"windSpeedTH": null,
#end if
#if $d.windDir.avg.has_data
"windDirection": $d.windDir.avg.formatted.replace(",", "."),
"windText": "$d.windDir.avg.ordinal_compass",
#else
"windDirection": null,
"windText": "N/A",
#end if
#if $d.barometer.avg.has_data
"pressure": $d.barometer.avg.formatted.replace(",", "."),
"pressureTL": $d.barometer.min.formatted.replace(",", "."),
"pressureTH": $d.barometer.max.formatted.replace(",", "."),
#else
"pressure": null,
"pressureTL": null,
"pressureTH": null,
#end if
#if $trend($time_delta=86400).pressure.has_data
"pressureTrend": "$trend($time_delta=86400).pressure.nolabel("%+.1f").replace(",", ".")",
#else
"pressureTrend": null,
#end if
#if $d.rain.avg.has_data
"rain": $d.rain.sum.formatted.replace(",", "."),
#else
"rain": null,
#end if
#if $d.rainRate.avg.has_data
"rainrate": $d.rainRate.avg.formatted.replace(",", "."),
"rainrateTH": $d.rainRate.max.formatted.replace(",", "."),
#else
"rainrate": null,
"rainrateTH": null,
#end if
#if $d.outHumidity.avg.has_data
"outHumidity": $d.outHumidity.avg.formatted.replace(",", "."),
"outHumidityTL": $d.outHumidity.min.formatted.replace(",", "."),
"outHumidityTH": $d.outHumidity.max.formatted.replace(",", "."),
#else
"outHumidity": null,
"outHumidityTL": null,
"outHumidityTH": null,
"inHumidity": null,
"inHumidityTL": null,
"inHumidityTH": null,
#end if
#if $d.inHumidity.avg.has_data
"inHumidity": $d.inHumidity.avg.formatted.replace(",", "."),
"inHumidityTL": $d.inHumidity.min.formatted.replace(",", "."),
"inHumidityTH": $d.inHumidity.max.formatted.replace(",", "."),
#else
"inHumidity": null,
"inHumidityTL": null,
"inHumidityTH": null,
#end if
#if $d.PM10.avg.has_data
"PM10": $d.PM10.avg.nolabel("%.2f").replace(",", "."),
"PM10TH": $d.PM10.max.nolabel("%.2f").replace(",", "."),
"PM10TL": $d.PM10.min.nolabel("%.2f").replace(",", "."),
#else
"PM10": null,
"PM25": null },
"PM10TH": null,
"PM10TL": null,
#end if
#if $d.PM25.avg.has_data
"PM25": $d.PM25.avg.nolabel("%.2f").replace(",", "."),
"PM25TH": $d.PM25.max.nolabel("%.2f").replace(",", "."),
"PM25TL": $d.PM25.min.nolabel("%.2f").replace(",", ".") },
#else
"PM25": null,
"PM25TH": null,
"PM25TL": null },
#end if
#end for
{}
]
]
\ No newline at end of file
......@@ -2,71 +2,131 @@
#encoding UTF-8
[
#for $w in $year.spans(interval=604800)
{ "dateTime": "$w.dateTime.format("%W")",
#if $w.barometer.avg.formatted != "0"
{ "dateTime": "$w.dateTime.format("%W")",
#if $w.inTemp.avg.has_data
"inTemp": $w.inTemp.avg.formatted.replace(",", "."),
"inTempTL": $w.inTemp.min.formatted.replace(",", "."),
"inTempTH": $w.inTemp.max.formatted.replace(",", "."),
#else
"inTemp": null,
"inTempTL": null,
"inTempTH": null,
#end if
#if $w.outTemp.avg.has_data
"outTemp": $w.outTemp.avg.formatted.replace(",", "."),
"outTempTL": $w.outTemp.min.formatted.replace(",", "."),
"outTempTH": $w.outTemp.max.formatted.replace(",", "."),
#else
"outTemp": null,
"outTempTL": null,
"outTempTH": null,
#end if
#if $trend($time_delta=604800).outTemp.has_data
"tempTrend": "$trend($time_delta=604800).outTemp.nolabel("%+.1f").replace(",", ".")",
#else
"tempTrend": "0",
#end if
#if $w.dewpoint.avg.has_data
"dewpoint": $w.dewpoint.avg.formatted.replace(",", "."),
"dewpointTL": $w.dewpoint.min.formatted.replace(",", "."),
"dewpointTH": $w.dewpoint.max.formatted.replace(",", "."),
"windChill": $w.windchill.avg.formatted.replace(",", "."),
"windChillTL": $w.windchill.min.formatted.replace(",", "."),
"heatIndex": $w.heatindex.avg.formatted.replace(",", "."),
"heatIndexTH": $w.heatindex.max.formatted.replace(",", "."),
"windSpeed": $w.windSpeed.avg.formatted.replace(",", "."),
"windSpeedTH": $w.windGust.max.formatted.replace(",", "."),
"windDirection": $w.windDir.avg.formatted.replace(",", "."),
"pressure": $w.barometer.avg.formatted.replace(",", "."),
"pressureTL": $w.barometer.min.formatted.replace(",", "."),
"pressureTH": $w.barometer.max.formatted.replace(",", "."),
"rain": $w.rain.sum.formatted.replace(",", "."),
"rainrate": $w.rainRate.avg.formatted.replace(",", "."),
"rainrateTH": $w.rainRate.max.formatted.replace(",", "."),
"outHumidity": $w.outHumidity.avg.formatted.replace(",", "."),
"outHumidityTL": $w.outHumidity.min.formatted.replace(",", "."),
"outHumidityTH": $w.outHumidity.max.formatted.replace(",", "."),
"inHumidity": $w.inHumidity.avg.formatted.replace(",", "."),
"inHumidityTL": $w.inHumidity.min.formatted.replace(",", "."),
"inHumidityTH": $w.inHumidity.max.formatted.replace(",", "."),
#if $year.PM10.has_data
"PM10": $w.PM10.avg.nolabel("%.2f").replace(",", "."),
#end if
#if $year.PM25.has_data
"PM25": $w.PM25.avg.nolabel("%.2f").replace(",", ".") },
#else
"foo": "" },
#end if
#else
"inTemp": null,
"outTemp": null,
"outTempTL": null,
"outTempTH": null,
#else
"dewpoint": null,
"dewpointTL": null,
"dewpointTH": null,
#end if
#if $w.windchill.avg.has_data
"windChill": $w.windchill.avg.formatted.replace(",", "."),
"windChillTL": $w.windchill.min.formatted.replace(",", "."),
#else
"windChill": null,
"windChillTL": null,
#end if
#if $w.heatindex.avg.has_data
"heatIndex": $w.heatindex.avg.formatted.replace(",", "."),
"heatIndexTH": $w.heatindex.max.formatted.replace(",", "."),
#else
"heatIndex": null,
"heatIndexTH": null,
#end if
#if $w.windSpeed.avg.has_data
"windSpeed": $w.windSpeed.avg.formatted.replace(",", "."),
#else
"windSpeed": null,
#end if
#if $w.windGust.avg.has_data
"windSpeedTH": $w.windGust.max.formatted.replace(",", "."),
#else
"windSpeedTH": null,
#end if
#if $w.windDir.avg.has_data
"windDirection": $w.windDir.avg.formatted.replace(",", "."),
"windText": "$w.windDir.avg.ordinal_compass",
#else
"windDirection": null,
"windText": "N/A",
#end if
#if $w.barometer.avg.has_data
"pressure": $w.barometer.avg.formatted.replace(",", "."),
"pressureTL": $w.barometer.min.formatted.replace(",", "."),
"pressureTH": $w.barometer.max.formatted.replace(",", "."),
#else
"pressure": null,
"pressureTL": null,
"pressureTH": null,
#end if
#if $trend($time_delta=604800).pressure.has_data
"pressureTrend": "$trend($time_delta=604800).pressure.nolabel("%+.1f").replace(",", ".")",
#else
"pressureTrend": null,
#end if
#if $w.rain.avg.has_data
"rain": $w.rain.sum.formatted.replace(",", "."),
#else
"rain": null,
#end if
#if $w.rainRate.avg.has_data
"rainrate": $w.rainRate.avg.formatted.replace(",", "."),
"rainrateTH": $w.rainRate.max.formatted.replace(",", "."),
#else
"rainrate": null,
"rainrateTH": null,
#end if
#if $w.outHumidity.avg.has_data
"outHumidity": $w.outHumidity.avg.formatted.replace(",", "."),
"outHumidityTL": $w.outHumidity.min.formatted.replace(",", "."),
"outHumidityTH": $w.outHumidity.max.formatted.replace(",", "."),
#else
"outHumidity": null,
"outHumidityTL": null,
"outHumidityTH": null,
"inHumidity": null,
"inHumidityTL": null,
"inHumidityTH": null,
#end if
#if $w.inHumidity.avg.has_data
"inHumidity": $w.inHumidity.avg.formatted.replace(",", "."),
"inHumidityTL": $w.inHumidity.min.formatted.replace(",", "."),
"inHumidityTH": $w.inHumidity.max.formatted.replace(",", "."),
#else
"inHumidity": null,
"inHumidityTL": null,
"inHumidityTH": null,
#end if
#if $w.PM10.avg.has_data
"PM10": $w.PM10.avg.nolabel("%.2f").replace(",", "."),
"PM10TH": $w.PM10.max.nolabel("%.2f").replace(",", "."),
"PM10TL": $w.PM10.min.nolabel("%.2f").replace(",", "."),
#else
"PM10": null,
"PM25": null },
"PM10TH": null,
"PM10TL": null,
#end if
#if $w.PM25.avg.has_data
"PM25": $w.PM25.avg.nolabel("%.2f").replace(",", "."),
"PM25TH": $w.PM25.max.nolabel("%.2f").replace(",", "."),
"PM25TL": $w.PM25.min.nolabel("%.2f").replace(",", ".") },
#else
"PM25": null,
"PM25TH": null,
"PM25TL": null },
#end if
#end for
{}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -2,15 +2,6 @@
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/W:/template_rabenwetter/src/skin.conf</file>
<file>file:/W:/template_rabenwetter/Gruntfile.js</file>
<file>file:/W:/template_rabenwetter/tools/install.sh</file>
<file>file:/W:/template_rabenwetter/src/archive.html</file>
<file>file:/W:/template_rabenwetter/src/archive/current.json.tmpl</file>
<file>file:/W:/template_rabenwetter/src/archive/day-YYYY-MM-DD.json.tmpl</file>
<file>file:/W:/template_rabenwetter/src/assets/js/main.js</file>
<file>file:/W:/template_rabenwetter/tools/update.sh</file>
</group>
<group/>
</open-files>
</project-private>
This diff is collapsed.
......@@ -2,71 +2,131 @@
#encoding UTF-8
[
#for $d in $month.days
{ "dateTime": "$d.dateTime.format("%d.")",
#if $d.barometer.avg.formatted != "0"
{ "dateTime": "$d.dateTime.format("%d.")",
#if $d.inTemp.avg.has_data
"inTemp": $d.inTemp.avg.formatted.replace(",", "."),
"inTempTL": $d.inTemp.min.formatted.replace(",", "."),
"inTempTH": $d.inTemp.max.formatted.replace(",", "."),
#else
"inTemp": null,
"inTempTL": null,
"inTempTH": null,
#end if
#if $d.outTemp.avg.has_data
"outTemp": $d.outTemp.avg.formatted.replace(",", "."),
"outTempTL": $d.outTemp.min.formatted.replace(",", "."),
"outTempTH": $d.outTemp.max.formatted.replace(",", "."),
#else
"outTemp": null,
"outTempTL": null,
"outTempTH": null,
#end if
#if $trend($time_delta=86400).outTemp.has_data
"tempTrend": "$trend($time_delta=86400).outTemp.nolabel("%+.1f").replace(",", ".")",
#else
"tempTrend": "0",
#end if
#if $d.dewpoint.avg.has_data
"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.windGust.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(",", "."),
#if $month.PM10.has_data
"PM10": $d.PM10.avg.nolabel("%.2f").replace(",", "."),
#end if
#if $month.PM25.has_data
"PM25": $d.PM25.avg.nolabel("%.2f").replace(",", ".") },
#else
"foo": "" },
#end if
#else
"inTemp": null,
"outTemp": null,
"outTempTL": null,
"outTempTH": null,
#else
"dewpoint": null,
"dewpointTL": null,
"dewpointTH": null,
#end if
#if $d.windchill.avg.has_data
"windChill": $d.windchill.avg.formatted.replace(",", "."),
"windChillTL": $d.windchill.min.formatted.replace(",", "."),
#else
"windChill": null,
"windChillTL": null,
#end if
#if $d.heatindex.avg.has_data
"heatIndex": $d.heatindex.avg.formatted.replace(",", "."),
"heatIndexTH": $d.heatindex.max.formatted.replace(",", "."),
#else
"heatIndex": null,
"heatIndexTH": null,
#end if
#if $d.windSpeed.avg.has_data
"windSpeed": $d.windSpeed.avg.formatted.replace(",", "."),
#else
"windSpeed": null,
#end if
#if $d.windGust.avg.has_data
"windSpeedTH": $d.windGust.max.formatted.replace(",", "."),
#else
"windSpeedTH": null,
#end if
#if $d.windDir.avg.has_data
"windDirection": $d.windDir.avg.formatted.replace(",", "."),
"windText": "$d.windDir.avg.ordinal_compass",
#else
"windDirection": null,
"windText": "N/A",
#end if
#if $d.barometer.avg.has_data
"pressure": $d.barometer.avg.formatted.replace(",", "."),
"pressureTL": $d.barometer.min.formatted.replace(",", "."),
"pressureTH": $d.barometer.max.formatted.replace(",", "."),
#else
"pressure": null,
"pressureTL": null,
"pressureTH": null,
#end if
#if $trend($time_delta=86400).pressure.has_data
"pressureTrend": "$trend($time_delta=86400).pressure.nolabel("%+.1f").replace(",", ".")",
#else
"pressureTrend": null,
#end if
#if $d.rain.avg.has_data
"rain": $d.rain.sum.formatted.replace(",", "."),
#else
"rain": null,
#end if
#if $d.rainRate.avg.has_data
"rainrate": $d.rainRate.avg.formatted.replace(",", "."),
"rainrateTH": $d.rainRate.max.formatted.replace(",", "."),
#else
"rainrate": null,
"rainrateTH": null,
#end if
#if $d.outHumidity.avg.has_data
"outHumidity": $d.outHumidity.avg.formatted.replace(",", "."),
"outHumidityTL": $d.outHumidity.min.formatted.replace(",", "."),
"outHumidityTH": $d.outHumidity.max.formatted.replace(",", "."),
#else
"outHumidity": null,
"outHumidityTL": null,
"outHumidityTH": null,
"inHumidity": null,
"inHumidityTL": null,
"inHumidityTH": null,
#end if
#if $d.inHumidity.avg.has_data
"inHumidity": $d.inHumidity.avg.formatted.replace(",", "."),
"inHumidityTL": $d.inHumidity.min.formatted.replace(",", "."),
"inHumidityTH": $d.inHumidity.max.formatted.replace(",", "."),
#else
"inHumidity": null,
"inHumidityTL": null,
"inHumidityTH": null,
#end if
#if $d.PM10.avg.has_data
"PM10": $d.PM10.avg.nolabel("%.2f").replace(",", "."),
"PM10TH": $d.PM10.max.nolabel("%.2f").replace(",", "."),
"PM10TL": $d.PM10.min.nolabel("%.2f").replace(",", "."),
#else
"PM10": null,
"PM25": null },
"PM10TH": null,
"PM10TL": null,
#end if
#if $d.PM25.avg.has_data
"PM25": $d.PM25.avg.nolabel("%.2f").replace(",", "."),
"PM25TH": $d.PM25.max.nolabel("%.2f").replace(",", "."),
"PM25TL": $d.PM25.min.nolabel("%.2f").replace(",", ".") },
#else
"PM25": null,
"PM25TH": null,
"PM25TL": null },
#end if
#end for
{}
......
......@@ -2,72 +2,132 @@
#encoding UTF-8
[
#for $d in $week.days
{ "dateTime": "$d.dateTime.format("%a")",
#if $d.barometer.avg.formatted != "0"
{ "dateTime": "$d.dateTime.format("%a")",
#if $d.inTemp.avg.has_data
"inTemp": $d.inTemp.avg.formatted.replace(",", "."),
"inTempTL": $d.inTemp.min.formatted.replace(",", "."),
"inTempTH": $d.inTemp.max.formatted.replace(",", "."),
#else
"inTemp": null,
"inTempTL": null,
"inTempTH": null,
#end if
#if $d.outTemp.avg.has_data
"outTemp": $d.outTemp.avg.formatted.replace(",", "."),
"outTempTL": $d.outTemp.min.formatted.replace(",", "."),
"outTempTH": $d.outTemp.max.formatted.replace(",", "."),
#else
"outTemp": null,
"outTempTL": null,
"outTempTH": null,
#end if
#if $trend($time_delta=86400).outTemp.has_data
"tempTrend": "$trend($time_delta=86400).outTemp.nolabel("%+.1f").replace(",", ".")",
#else
"tempTrend": "0",
#end if
#if $d.dewpoint.avg.has_data
"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.windGust.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(",", "."),