feedparse

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package feedparse turns RSS, Atom and JSON Feed documents into kind items: one feed is usually one root item with entries as leaves.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StableID

func StableID(s string) string

StableID turns a feed URL/id into a legal plugin external id.

Types

type Entry

type Entry struct {
	ID      string
	Title   string
	Summary string
	Link    string
	Audio   string // enclosure/media URL, when the entry carries one
	Image   string
	Date    time.Time
	Authors []string
}

Entry is one normalised feed entry.

type Feed

type Feed struct {
	Title   string
	Summary string
	Link    string
	Image   string
	Entries []Entry
}

Feed is a normalised feed document.

func Parse

func Parse(data []byte) (Feed, error)

Parse detects and parses RSS 2.0, Atom or JSON Feed.

func (Feed) Items

func (f Feed) Items(rootLevel, leafLevel, feedURL string) ([]etherplugin.KindItem, error)

Items maps a feed onto a two-level kind: the feed as root, entries as playable leaves whose hints carry the link/media URLs for the resolver.

Jump to

Keyboard shortcuts

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