reader

package
v0.0.0-...-8bcb013 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinFetchInterval = 60
	MaxFetchInterval = 60 * 24
)

Variables

This section is empty.

Functions

func CalculateNextFetchTime

func CalculateNextFetchTime(consecutiveEmptyFetches int, avgItemsPerDay float64, wasManual bool) time.Time

Types

type Cleaner

type Cleaner struct{}

func DefaultCleaner

func DefaultCleaner() *Cleaner

func (*Cleaner) CleanField

func (c *Cleaner) CleanField(in string) string

func (*Cleaner) HTMLToMarkdown

func (c *Cleaner) HTMLToMarkdown(in string) (string, error)

type Feed

type Feed struct {
	Title       string
	Description string
	Items       []*Item
}

type Fetcher

type Fetcher struct {
	// contains filtered or unexported fields
}

func NewFetcher

func NewFetcher(httpClient *http.Client) *Fetcher

func (*Fetcher) Fetch

func (f *Fetcher) Fetch(rssURL string) (*Feed, error)

type Item

type Item struct {
	URL         string
	Title       string
	Summary     string
	PublishedAt *time.Time
}

Jump to

Keyboard shortcuts

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