Initial MVP commit
This commit is contained in:
20
templates/alerts_active.txt.tmpl
Normal file
20
templates/alerts_active.txt.tmpl
Normal file
@@ -0,0 +1,20 @@
|
||||
{{- if .Data -}}
|
||||
Active Alerts
|
||||
As Of: {{.Data.AsOf}}
|
||||
Alerts: {{len .Data.Alerts}}
|
||||
{{- range $i, $alert := .Data.Alerts}}
|
||||
|
||||
[{{$i}}] {{$alert.ID}}
|
||||
{{- if $alert.Headline}}
|
||||
Headline: {{$alert.Headline}}
|
||||
{{- end}}
|
||||
{{- if $alert.Severity}}
|
||||
Severity: {{$alert.Severity}}
|
||||
{{- end}}
|
||||
{{- if $alert.Expires}}
|
||||
Expires: {{$alert.Expires}}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
{{- else -}}
|
||||
No active alerts data available.
|
||||
{{- end}}
|
||||
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}}
|
||||
12
templates/observations.txt.tmpl
Normal file
12
templates/observations.txt.tmpl
Normal file
@@ -0,0 +1,12 @@
|
||||
{{- if .Data -}}
|
||||
Observation
|
||||
Station ID: {{if .Data.StationID}}{{.Data.StationID}}{{else}}n/a{{end}}
|
||||
Station Name: {{if .Data.StationName}}{{.Data.StationName}}{{else}}n/a{{end}}
|
||||
Timestamp: {{.Data.Timestamp}}
|
||||
Condition Code: {{.Data.ConditionCode}}
|
||||
{{- if .Data.TextDescription}}
|
||||
Summary: {{.Data.TextDescription}}
|
||||
{{- end}}
|
||||
{{- else -}}
|
||||
No observation data available.
|
||||
{{- end}}
|
||||
Reference in New Issue
Block a user