readeef: Index | Files

package parser

import ""


Package Files

atom.go feed.go opml.go parser.go pubsub.go rss.go rss1.go rss2.go


const (
    RFC1123NoSecond = "Mon, 02 Jan 2006 15:04 MST"

type Article Uses

type Article struct {
    Title       string
    Description string
    Link        string
    Guid        string
    Date        time.Time

type Feed Uses

type Feed struct {
    Title       string
    Description string
    SiteLink    string
    HubLink     string
    Image       Image
    Articles    []Article
    TTL         time.Duration
    SkipHours   map[int]bool
    SkipDays    map[string]bool

func ParseAtom Uses

func ParseAtom(b []byte) (Feed, error)

func ParseFeed Uses

func ParseFeed(source []byte, funcs ...func([]byte) (Feed, error)) (Feed, error)

func ParseRss1 Uses

func ParseRss1(b []byte) (Feed, error)

func ParseRss2 Uses

func ParseRss2(b []byte) (Feed, error)

type Image Uses

type Image struct {
    Title  string
    Url    string
    Width  int
    Height int

type Opml Uses

type Opml struct {
    Feeds []OpmlFeed

func ParseOpml Uses

func ParseOpml(content []byte) (Opml, error)

type OpmlBody Uses

type OpmlBody struct {
    Outline []OpmlOutline `xml:"outline"`

type OpmlFeed Uses

type OpmlFeed struct {
    Title string
    URL   string
    Tags  []string

type OpmlHead Uses

type OpmlHead struct {
    Title string `xml:"title"`

type OpmlOutline Uses

type OpmlOutline struct {
    Type     string        `xml:"type,attr,omitempty"`
    Text     string        `xml:"text,attr,omitempty"`
    Title    string        `xml:"title,attr,omitempty"`
    XmlUrl   string        `xml:"xmlUrl,attr,omitempty"`
    HtmlUrl  string        `xml:"htmlUrl,attr,omitempty"`
    URL      string        `xml:"url,attr,omitempty"`
    Category string        `xml:"category,attr,omitempty"`
    Outline  []OpmlOutline `xml:"outline"`

type OpmlXml Uses

type OpmlXml struct {
    XMLName xml.Name `xml:"opml"`
    Version string   `xml:"version,attr"`
    Head    OpmlHead `xml:"head"`
    Body    OpmlBody `xml:"body"`

type RssItem Uses

type RssItem struct {
    XMLName     xml.Name   `xml:"item"`
    Id          string     `xml:"guid"`
    Title       string     `xml:"title"`
    Link        string     `xml:"link"`
    Description rssContent `xml:"description"`
    Content     rssContent `xml:" encoded"`
    PubDate     string     `xml:"pubDate"`
    Date        string     `xml:"date"`
    TTL         int        `xml:"ttl"`
    SkipHours   []int      `xml:"skipHours>hour"`
    SkipDays    []string   `xml:"skipDays>day"`

RssItem is the base content for both rss1 and rss2 feeds. The only reason it's public is because of the refrect package

Package parser imports 6 packages (graph) and is imported by 5 packages. Updated 2020-05-01. Refresh now. Tools for package owners.