feed

package
v0.0.0-...-b86c98c Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name    string      `yaml:"name"`
	URL     url.URL     `yaml:"url"`
	Exclude []regexp.RE `yaml:"exclude,omitempty"`
	Include []regexp.RE `yaml:"include,omitempty"`
}

Config contains the details of a single feed

func (*Config) IsIncluded

func (f *Config) IsIncluded(s string) bool

func (*Config) PostFromGoFeedItem

func (f *Config) PostFromGoFeedItem(
	linkers []Linker,
	parsedFeed *gofeed.Feed,
	item *gofeed.Item,
) *Post
type ExtLink struct {
	Name string
	Link string
}

ExtLink is a link to an external source

type Linker

type Linker struct {
	Name       string `yaml:"name"`
	URLPattern string `yaml:"url"`
}

Linker contains link patterns to other sites

type Post

type Post struct {
	FeedName string
	FeedLink string
	Title    string
	Link     string
	Time     *time.Time
	ExtLinks []ExtLink
}

func (*Post) After

func (p *Post) After(other *Post) bool

func (*Post) FormattedTime

func (p *Post) FormattedTime() string

Jump to

Keyboard shortcuts

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