parser

package
v0.0.0-...-e21216f Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Atom 1.0 parser

JSON 1.0 parser

Parser for RSS versions: - 0.90 - 1.0

Parser for RSS versions: - 0.91 netscape - 0.91 userland - 2.0

Index

Constants

This section is empty.

Variables

View Source
var UnknownFormat = errors.New("unknown feed format")

Functions

func NewSafeXMLReader

func NewSafeXMLReader(r io.Reader) io.Reader

Types

type Feed

type Feed struct {
	Title   string
	SiteURL string
	Items   []Item
}

func Parse

func Parse(r io.Reader) (*Feed, error)

func ParseAndFix

func ParseAndFix(r io.Reader, baseURL, fallbackEncoding string) (*Feed, error)

func ParseAtom

func ParseAtom(r io.Reader) (*Feed, error)

func ParseJSON

func ParseJSON(data io.Reader) (*Feed, error)

func ParseRDF

func ParseRDF(r io.Reader) (*Feed, error)

func ParseRSS

func ParseRSS(r io.Reader) (*Feed, error)

func ParseWithEncoding

func ParseWithEncoding(r io.Reader, fallbackEncoding string) (*Feed, error)

func (*Feed) SetMissingDatesTo

func (feed *Feed) SetMissingDatesTo(newdate time.Time)

func (*Feed) TranslateURLs

func (feed *Feed) TranslateURLs(base string) error

type Item

type Item struct {
	GUID  string
	Date  time.Time
	URL   string
	Title string

	Content  string
	ImageURL string
	AudioURL string
}

Jump to

Keyboard shortcuts

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