feed

package
v0.0.0-...-2b4b274 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUrlFailed   = "Parsing URL Failed: "
	ErrCmdFailed   = "Executing Command Failed: "
	ErrParseFailed = "Parseing Feed Failed: "
)

Functions

func EncodeFeed

func EncodeFeed(feeds *Feed) ([]byte, error)

func EncodeGroup

func EncodeGroup(g *Group) ([]byte, error)

func FormatDate

func FormatDate(t *time.Time) string

func FormatTime

func FormatTime(t *time.Time) string

func SortItems

func SortItems(items []*Item)

Types

type Cmd

type Cmd struct {
	Cmd  string
	Args []string
}

type Feed

type Feed struct {
	*gofeed.Feed
	Color int
	Items []*Item
}

func DecodeFeed

func DecodeFeed(data []byte) *Feed

func GetFeedFromURL

func GetFeedFromURL(url string, color int) (*Feed, error)

func (*Feed) SetColor

func (f *Feed) SetColor(color int)

type Group

type Group struct {
	Title          string
	IsFirstUpdated bool
	FeedLinks      []string
}

func DecodeGroup

func DecodeGroup(data []byte) *Group

func MergeFeeds

func MergeFeeds(feeds []*Feed, title string) *Group

type Item

type Item struct {
	*gofeed.Item
	Belong string
	Color  int
}

Jump to

Keyboard shortcuts

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