Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NewsItem ¶
type NewsItem struct {
Episode youtube.Episode
Community *community.BlogPost // nil if no match within ±7 days
}
NewsItem pairs a YouTube episode with its matched Community blog post (if any).
func Correlate ¶
Correlate pairs each episode with the closest Community post within ±7 days. When multiple posts are within the window, the one with the highest title similarity (longest common substring length) wins. Each post is used at most once — episodes are matched in order, and once a post is claimed, later episodes cannot reuse it. Episodes with no match have Community set to nil. Input episode order is preserved.
func LoadBaseline ¶
LoadBaseline reads a pre-fetched news-episodes.json from the content pack. This file is committed by a GitHub Action and pulled during sync.
func LoadCacheStale ¶
LoadCacheStale reads cached news items ignoring TTL. Used as fallback when live fetches fail.