49 lines
1.4 KiB
Go
49 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",
|
|
GenerationMode: GenerationModeGeneratedTextTemplate,
|
|
TemplateID: "tomorrow",
|
|
GeneratedTextSchemaID: "tomorrow",
|
|
ComparisonStrategy: CompareSameValidDate,
|
|
ArtifactGroup: "tomorrow",
|
|
BatchOutputName: "tomorrow.md",
|
|
Generated: true,
|
|
CompatiblePriorIDs: []ID{Tomorrow},
|
|
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
|
|
}
|