rss

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const RuleNamePrefix = "ADL-"

Variables

This section is empty.

Functions

func AddAndGetItems

func AddAndGetItems(url, path string) (*qbt.Item, error)

AddAndGetItems called only for finished items with rss type for now

func Download

func Download(adlr qbt.AutoDLRule, path string) (err error)

func GetItems

func GetItems(rssPath string) (*qbt.Item, error)

func GetMatchedArts

func GetMatchedArts(rssPath string) (arts []string, err error)

func RmRss

func RmRss(rssPath string) error

func SetAutoDLRule

func SetAutoDLRule(rssurl, categ, dlpath, rsspath string,
	enableFilter bool, contain, exclusion string) error

Types

type FilterFunc added in v0.0.8

type FilterFunc func(n string) bool

type Item added in v0.0.8

type Item struct {
	TorrUrl string
	Desc    string
	Title   string
	Guid    string
}

type Parser

type Parser struct {
	Feed string
}
func (p *Parser) GetTitleAndLink() (title string, link string, err error)

type Reader added in v0.0.8

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

Reader represents an RSS feed reader that parses and filters feed items. It contains a parser for RSS feeds, the feed URL, a map to track processed item GUIDs, and a filter function to apply custom filtering logic to feed items.

func NewReader added in v0.0.8

func NewReader(feed string, guids map[string]struct{}, filterFunc FilterFunc) *Reader

func (*Reader) Guids added in v0.0.8

func (r *Reader) Guids() map[string]struct{}

func (*Reader) Read added in v0.0.8

func (r *Reader) Read() ([]Item, bool, error)

func (*Reader) ReadOne added in v0.0.8

func (r *Reader) ReadOne() (Item, bool, error)

func (*Reader) Seek added in v0.0.8

func (r *Reader) Seek() ([]Item, bool, error)

func (*Reader) Undo added in v0.0.8

func (r *Reader) Undo(guid string)

Jump to

Keyboard shortcuts

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