Initial MVP commit
This commit is contained in:
17
templates/forecast_hourly.txt.tmpl
Normal file
17
templates/forecast_hourly.txt.tmpl
Normal file
@@ -0,0 +1,17 @@
|
||||
{{- if .Data -}}
|
||||
Hourly Forecast
|
||||
Location ID: {{if .Data.LocationID}}{{.Data.LocationID}}{{else}}n/a{{end}}
|
||||
Location Name: {{if .Data.LocationName}}{{.Data.LocationName}}{{else}}n/a{{end}}
|
||||
Issued At: {{.Data.IssuedAt}}
|
||||
Periods: {{len .Data.Periods}}
|
||||
{{- range $i, $period := .Data.Periods}}
|
||||
|
||||
[{{$i}}] {{$period.StartTime}} -> {{$period.EndTime}}
|
||||
Condition Code: {{$period.ConditionCode}}
|
||||
{{- if $period.TextDescription}}
|
||||
Summary: {{$period.TextDescription}}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
{{- else -}}
|
||||
No hourly forecast data available.
|
||||
{{- end}}
|
||||
Reference in New Issue
Block a user