Implemented weather stories support
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
This commit is contained in:
26
templates/weatherstories.txt.tmpl
Normal file
26
templates/weatherstories.txt.tmpl
Normal file
@@ -0,0 +1,26 @@
|
||||
{{- if .Data -}}
|
||||
Weather Stories
|
||||
Office ID: {{if .Data.OfficeID}}{{.Data.OfficeID}}{{else}}n/a{{end}}
|
||||
As Of: {{.Data.AsOf}}
|
||||
Stories: {{len .Data.Stories}}
|
||||
{{- range $i, $story := .Data.Stories}}
|
||||
|
||||
[{{$i}}] {{if $story.Title}}{{$story.Title}}{{else}}Untitled{{end}}
|
||||
Start: {{$story.StartTime}}
|
||||
End: {{$story.EndTime}}
|
||||
Updated: {{$story.UpdatedAt}}
|
||||
Priority: {{$story.Priority}}
|
||||
Order: {{$story.Order}}
|
||||
{{- if $story.Description}}
|
||||
Description: {{$story.Description}}
|
||||
{{- end}}
|
||||
{{- if $story.AltText}}
|
||||
Alt Text: {{$story.AltText}}
|
||||
{{- end}}
|
||||
{{- if $story.DownloadURL}}
|
||||
Download URL: {{$story.DownloadURL}}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
{{- else -}}
|
||||
No weather stories data available.
|
||||
{{- end}}
|
||||
21
templates/weatherstories_latest.txt.tmpl
Normal file
21
templates/weatherstories_latest.txt.tmpl
Normal file
@@ -0,0 +1,21 @@
|
||||
{{- if .Data -}}
|
||||
Latest Weather Story
|
||||
Office ID: {{if .Data.OfficeID}}{{.Data.OfficeID}}{{else}}n/a{{end}}
|
||||
Title: {{if .Data.Title}}{{.Data.Title}}{{else}}Untitled{{end}}
|
||||
Start: {{.Data.StartTime}}
|
||||
End: {{.Data.EndTime}}
|
||||
Updated: {{.Data.UpdatedAt}}
|
||||
Priority: {{.Data.Priority}}
|
||||
Order: {{.Data.Order}}
|
||||
{{- if .Data.Description}}
|
||||
Description: {{.Data.Description}}
|
||||
{{- end}}
|
||||
{{- if .Data.AltText}}
|
||||
Alt Text: {{.Data.AltText}}
|
||||
{{- end}}
|
||||
{{- if .Data.DownloadURL}}
|
||||
Download URL: {{.Data.DownloadURL}}
|
||||
{{- end}}
|
||||
{{- else -}}
|
||||
No weather stories data available.
|
||||
{{- end}}
|
||||
Reference in New Issue
Block a user