51 lines
1.4 KiB
Go
51 lines
1.4 KiB
Go
package report
|
|
|
|
import (
|
|
"gitea.maximumdirect.net/eric/weatherreporter/internal/module"
|
|
"gitea.maximumdirect.net/eric/weatherreporter/internal/timeutil"
|
|
)
|
|
|
|
func tomorrowDefinition() Definition {
|
|
return Definition{
|
|
ID: Tomorrow,
|
|
Name: "Tomorrow Report",
|
|
PromptID: "weather.tomorrow_generated_text",
|
|
PromptVersion: "2.0.0",
|
|
TemplateID: "tomorrow",
|
|
GeneratedTextSchemaID: "tomorrow",
|
|
ArtifactGroup: "tomorrow",
|
|
OutputName: "tomorrow.md",
|
|
DistributorPathTemplates: []string{
|
|
"daily/{valid_start_date}/{run_id}.md",
|
|
"daily/{valid_start_date}/index.md",
|
|
"tomorrow/index.md",
|
|
},
|
|
Modules: tomorrowModules(),
|
|
Evening: true,
|
|
resolve: resolveTomorrow,
|
|
}
|
|
}
|
|
|
|
func tomorrowModules() []module.ConfigItem {
|
|
return moduleItems(
|
|
module.Metadata,
|
|
module.CurrentConditions,
|
|
module.NarrativeForecast,
|
|
module.DerivedDailySummary,
|
|
module.DerivedDaypartSummaries,
|
|
module.PrecipTiming,
|
|
module.AlertDigest,
|
|
module.SPCConvectiveOutlooks,
|
|
module.AreaForecastDiscussion,
|
|
module.SPCConvectiveDiscussion,
|
|
module.WeatherStory,
|
|
module.OutdoorWindows,
|
|
module.TomorrowPlanning,
|
|
module.HourlyForecast,
|
|
)
|
|
}
|
|
|
|
func resolveTomorrow(req ResolveRequest) (timeutil.Period, error) {
|
|
return timeutil.CivilDay(req.Now.In(req.Location).AddDate(0, 0, 1), req.Location), nil
|
|
}
|