Simplify and rationalize the hourly report template
This commit is contained in:
@@ -6,88 +6,34 @@
|
||||
|
||||
## Current Conditions
|
||||
{{ with .Modules.CurrentConditions }}
|
||||
{{ with .ConditionText }}{{ . }}{{ end }}{{ with .TemperatureF }}; {{ . }} F{{ end }}{{ with .ApparentTemperatureF }}; feels like {{ . }} F{{ end }}{{ with .RelativeHumidityPercent }}; humidity {{ . }}%{{ end }}{{ with .WindDirection }}; wind {{ . }}{{ end }}{{ with .WindSpeedMph }} {{ . }} mph{{ end }}.
|
||||
{{ with .TemperatureF }}Currently, it is {{ . }}°F{{ with $.Modules.CurrentConditions.ConditionTextLower }} and {{ . }}{{ end }}.{{ else }}{{ with .ConditionText }}Currently, it is {{ . }}.{{ else }}Current conditions are unavailable.{{ end }}{{ end }}{{ with .ApparentTemperatureF }} It feels like {{ . }}°F{{ with $.Modules.CurrentConditions.RelativeHumidityPercent }}, with a relative humidity of {{ . }}%{{ end }}{{ with $.Modules.CurrentConditions.WindDirectionText }} and winds from the {{ . }}{{ with $.Modules.CurrentConditions.WindSpeedMph }} at {{ . }} mph{{ end }}{{ end }}.{{ else }}{{ with .RelativeHumidityPercent }} Relative humidity is {{ . }}%.{{ end }}{{ with .WindDirectionText }} Winds are from the {{ . }}{{ with $.Modules.CurrentConditions.WindSpeedMph }} at {{ . }} mph{{ end }}.{{ end }}{{ end }}
|
||||
{{ else }}
|
||||
No current conditions available.
|
||||
Current conditions are unavailable.
|
||||
{{ end }}
|
||||
|
||||
{{ with .Modules.AlertDigest }}{{ with .Relevant }}
|
||||
## Active Alerts
|
||||
{{ range . }}
|
||||
- **{{ if .Event }}{{ .Event }}{{ else }}{{ .Headline }}{{ end }}**{{ with .Headline }}: {{ . }}{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}{{ end }}
|
||||
## Hourly Forecast
|
||||
{{ with .Modules.HourlyForecast }}{{ range .Periods }}
|
||||
- **{{ .Name }}:** {{ .TextDescription }} and {{ .TemperatureF }}. Chance of precipitation {{ .ProbabilityOfPrecipitationPercent }}%.
|
||||
{{ end }}
|
||||
- **{{ if .HourLabel }}{{ .HourLabel }}{{ else }}{{ .Name }}{{ end }}:**{{ with .TemperatureF }} {{ . }}°F{{ end }}{{ with .TextDescriptionLower }} and {{ . }}{{ else }}{{ with .TextDescription }} and {{ . }}{{ end }}{{ end }}.{{ if .MentionPrecipitation }}{{ with .ProbabilityOfPrecipitationPercent }} Probability of precipitation is {{ . }}%.{{ end }}{{ end }}
|
||||
{{ else }}
|
||||
- No hourly forecast rows are available.
|
||||
{{ end }}{{ else }}
|
||||
- No hourly forecast rows are available.
|
||||
{{ end }}
|
||||
|
||||
{{ with .Modules.PrecipTiming }}{{ with .PrecipitationWindows }}
|
||||
## Precipitation Timing
|
||||
{{ with .Modules.PrecipTiming }}
|
||||
{{ with .MaxPopPercent }}Peak precipitation probability: {{ . }}%{{ with $.Modules.PrecipTiming.MaxPopTime }} at {{ . }}{{ end }}.
|
||||
{{ end }}{{ range .PrecipitationWindows }}{{ $window := . }}
|
||||
- Window: {{ .PeriodBegins }}{{ with .PeriodEnds }} to {{ . }}{{ end }}{{ with .MaxPopPercent }}; max {{ . }}%{{ with $window.MaxPopTime }} at {{ . }}{{ end }}{{ end }}
|
||||
{{ else }}
|
||||
No precipitation windows above threshold.
|
||||
{{ end }}{{ if .ThunderMentioned }}
|
||||
Thunder is mentioned in the forecast.
|
||||
{{ end }}{{ else }}
|
||||
No precipitation timing signal above threshold.
|
||||
{{ range . }}{{ $window := . }}
|
||||
- **{{ if .PeriodBeginsHourLabel }}{{ .PeriodBeginsHourLabel }}{{ else }}{{ .PeriodBegins }}{{ end }}**{{ with .PeriodEndsHourLabel }} to **{{ . }}**{{ else }}{{ with .PeriodEnds }} to **{{ . }}**{{ end }}{{ end }}: Precipitation is expected during this period.{{ with .MaxPopPercent }} The peak precipitation chance is {{ . }}%{{ with $window.MaxPopHourLabel }} at {{ . }}{{ else }}{{ with $window.MaxPopTime }} at {{ . }}{{ end }}{{ end }}.{{ end }}
|
||||
{{ end }}{{ with $.GeneratedText.PrecipitationTiming }}
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
|
||||
## Alerts
|
||||
{{ with .Modules.AlertDigest }}{{ if .Missing }}
|
||||
- Alert source missing.
|
||||
{{ else }}{{ range .Relevant }}
|
||||
- {{ if .Event }}{{ .Event }}{{ else }}{{ .Headline }}{{ end }}{{ with .Headline }}: {{ . }}{{ end }}{{ with .Severity }} ({{ . }}){{ end }}
|
||||
{{ else }}
|
||||
- No active alert overlaps for this report period.
|
||||
{{ end }}{{ end }}{{ else }}
|
||||
- No active alert overlaps for this report period.
|
||||
{{ end }}
|
||||
|
||||
## SPC Outlooks
|
||||
{{ with .Modules.SPCConvectiveOutlooks }}{{ range .Outlooks }}
|
||||
- {{ if .LabelText }}{{ .LabelText }}{{ else }}{{ if .Label }}{{ .Label }}{{ else }}{{ .OutlookType }}{{ end }}{{ end }}{{ with .PeriodBegins }} from {{ . }}{{ end }}{{ with .PeriodEnds }} to {{ . }}{{ end }}
|
||||
{{ else }}
|
||||
- No overlapping SPC outlooks.
|
||||
{{ end }}{{ else }}
|
||||
- No overlapping SPC outlooks.
|
||||
{{ end }}
|
||||
|
||||
{{ end }}{{ end }}
|
||||
## Forecast Discussion
|
||||
{{ with .Modules.AreaForecastDiscussion }}{{ range .KeyMessages }}
|
||||
- {{ . }}
|
||||
{{ end }}{{ with .ShortTerm }}
|
||||
|
||||
{{ . }}
|
||||
{{ end }}{{ else }}
|
||||
No area forecast discussion available.
|
||||
{{ end }}
|
||||
|
||||
## SPC Discussion
|
||||
{{ with .Modules.SPCConvectiveDiscussion }}{{ range .Discussions }}
|
||||
- {{ if .Headline }}{{ .Headline }}{{ else }}{{ if .Summary }}{{ .Summary }}{{ else }}{{ .Discussion }}{{ end }}{{ end }}{{ with .Summary }}: {{ . }}{{ end }}
|
||||
{{ else }}
|
||||
- No overlapping SPC discussion.
|
||||
{{ end }}{{ else }}
|
||||
- No overlapping SPC discussion.
|
||||
{{ end }}
|
||||
|
||||
## Weather Story
|
||||
{{ with .Modules.WeatherStory }}{{ if .Available }}
|
||||
{{ with .Title }}{{ . }}{{ end }}{{ with .Description }} - {{ . }}{{ end }}
|
||||
{{ else }}
|
||||
No weather story available.
|
||||
{{ end }}{{ else }}
|
||||
No weather story available.
|
||||
{{ end }}
|
||||
|
||||
## Timing
|
||||
|
||||
{{ .GeneratedText.Timing }}
|
||||
|
||||
## Impacts
|
||||
|
||||
{{ .GeneratedText.Impacts }}
|
||||
{{ with .GeneratedText.Confidence }}
|
||||
|
||||
## Confidence
|
||||
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
{{ .GeneratedText.ForecastDiscussion }}
|
||||
|
||||
Reference in New Issue
Block a user