Commit 18cbec25 authored by Philipp's avatar Philipp

Fixed Gruntfile.js to also copy day-YYYY-MM-DD.json.tmpl (reported by...

Fixed Gruntfile.js to also copy day-YYYY-MM-DD.json.tmpl (reported by https://gitlab.ambhost.net/nyphargus )
parent 35a6f366
......@@ -133,7 +133,7 @@ module.exports = function (grunt) {
{src: 'src/archive/amonth-YYYY-MM.json.tmpl', dest: 'dist/archive/amonth-YYYY-MM.json.tmpl'},
{src: 'src/archive/aweek-YYYY.json.tmpl', dest: 'dist/archive/aweek-YYYY.json.tmpl'},
{src: 'src/archive/ayear-YYYY.json.tmpl', dest: 'dist/archive/ayear-YYYY.json.tmpl'},
{src: 'src/archive/day-YYYY-MM.json.tmpl', dest: 'dist/archive/day-YYYY-MM.json.tmpl'},
{src: 'src/archive/day-YYYY-MM-DD.json.tmpl', dest: 'dist/archive/day-YYYY-MM-DD.json.tmpl'},
{src: 'src/archive/month-YYYY-MM.json.tmpl', dest: 'dist/archive/month-YYYY-MM.json.tmpl'},
{src: 'src/archive/week-YYYY-WW.json.tmpl', dest: 'dist/archive/week-YYYY-WW.json.tmpl'},
{src: 'src/archive/year-YYYY.json.tmpl', dest: 'dist/archive/year-YYYY.json.tmpl'},
......
#import datetime
#encoding UTF-8
[
#for $h in $day.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.windGust.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 $day.PM10.has_data
#if $h.PM10.has_data
"PM10": $h.PM10.avg.nolabel("%.2f").replace(",", "."),
#else
"PM10": null,
#end if
#end if
#if $day.PM25.has_data
#if $h.PM10.has_data
"PM25": $h.PM25.avg.nolabel("%.2f").replace(",", ".") },
#else
"PM25": null },
#end if
#else
"foo": "" },
#end if
#end for
{}
]
#import datetime
#encoding UTF-8
[
#for $h in $day.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.windGust.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 $day.PM10.has_data
#if $h.PM10.has_data
"PM10": $h.PM10.avg.nolabel("%.2f").replace(",", "."),
#else
"PM10": null,
#end if
#end if
#if $day.PM25.has_data
#if $h.PM10.has_data
"PM25": $h.PM25.avg.nolabel("%.2f").replace(",", ".") },
#else
"PM25": null },
#end if
#else
"foo": "" },
#end if
#end for
{}
]
#import datetime
#encoding UTF-8
[
#for $h in $day.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.windGust.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 $day.PM10.has_data
#if $h.PM10.has_data
"PM10": $h.PM10.avg.nolabel("%.2f").replace(",", "."),
#else
"PM10": null,
#end if
#end if
#if $day.PM25.has_data
#if $h.PM10.has_data
"PM25": $h.PM25.avg.nolabel("%.2f").replace(",", ".") },
#else
"PM25": null },
#end if
#else
"foo": "" },
#end if
#end for
{}
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment