From 7cd07c429b7fa8b93c259455eb8b7f0f4c47b80b Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Sun, 14 Jun 2026 09:07:10 -0500 Subject: [PATCH] Revise the hourly weather template --- .../reporttemplate/templates/hourly.md.tmpl | 40 ++++++++----------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/internal/reporttemplate/templates/hourly.md.tmpl b/internal/reporttemplate/templates/hourly.md.tmpl index d08dfb0..264a391 100644 --- a/internal/reporttemplate/templates/hourly.md.tmpl +++ b/internal/reporttemplate/templates/hourly.md.tmpl @@ -1,27 +1,9 @@ # {{ .Report.Title }} -{{ .Report.LocationName }} -Valid: {{ .Report.ValidPeriodLabel }} -Generated: {{ .Report.GeneratedAtLabel }} - -## Summary +**Updated:** {{ .Report.GeneratedAtLabel }} {{ .GeneratedText.Summary }} -## Timing - -{{ .GeneratedText.Timing }} - -## Impacts - -{{ .GeneratedText.Impacts }} -{{ with .GeneratedText.Confidence }} - -## Confidence - -{{ . }} -{{ end }} - ## 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 }}. @@ -31,11 +13,7 @@ No current conditions available. ## Hourly Forecast {{ with .Modules.HourlyForecast }}{{ range .Periods }} -- {{ if .PeriodBegins }}{{ .PeriodBegins }}{{ else }}{{ .Name }}{{ end }}: {{ if .TextDescription }}{{ .TextDescription }}{{ else }}{{ .Name }}{{ end }}{{ with .TemperatureF }}; {{ . }} F{{ end }}{{ with .ProbabilityOfPrecipitationPercent }}; {{ . }}% precipitation{{ end }}{{ if .WindDirection }}; wind {{ .WindDirection }}{{ with .WindSpeedMph }} {{ . }} mph{{ end }}{{ else }}{{ with .WindSpeedMph }}; wind {{ . }} mph{{ end }}{{ end }}{{ with .WindGustMph }}, gusts {{ . }} mph{{ end }} -{{ else }} -- No hourly forecast rows available. -{{ end }}{{ else }} -- No hourly forecast rows available. +- **{{ .Name }}:* {{ .TextDescription }} and {{ .TemperatureF }}. Chance of precipitation {{ .ProbabilityOfPrecipitationPercent }}%. {{ end }} ## Precipitation Timing @@ -98,3 +76,17 @@ No weather story available. {{ end }}{{ else }} No weather story available. {{ end }} + +## Timing + +{{ .GeneratedText.Timing }} + +## Impacts + +{{ .GeneratedText.Impacts }} +{{ with .GeneratedText.Confidence }} + +## Confidence + +{{ . }} +{{ end }} \ No newline at end of file