discovery

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2026 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceRSSLink      model.DiscoverySource = "rss-link"
	SourceSitemap      model.DiscoverySource = "sitemap"
	SourceDOMContainer model.DiscoverySource = "dom-container"
)

Source constants for DiscoveredFeed.Source.

View Source
const (

	// AcceptThreshold is the confidence score above which results are accepted without sampling.
	AcceptThreshold = 0.70
)

Variables

This section is empty.

Functions

func RefineByUrlPattern

func RefineByUrlPattern(allEntries, validEntries []*model.Recipe) (string, int)

RefineByUrlPattern derives the common URL path prefix from validEntries and returns the pattern and count of allEntries whose URL matches that prefix.

func ReplayDiscovered

func ReplayDiscovered(data *model.DataInput, feed *model.Feed, d *model.DiscoveredFeed) error

ReplayDiscovered replays a previously discovered feed configuration.

func ScrapeFeed

func ScrapeFeed(data *model.DataInput, feed *model.Feed) error

ScrapeFeed runs the universal discovery pipeline against the given DataInput. On success, feed.Entries will contain stub recipes (Url only) and feed.Discovered will describe how they were found.

func UrlPathPattern

func UrlPathPattern(urls []string) string

UrlPathPattern returns the common path prefix of the given URLs as a plain string. Example: ["/recipes/pasta", "/recipes/chicken"] → "/recipes/"

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL