riviera: hawx.me/code/riviera/subscriptions/opml Index | Files

package opml

import "hawx.me/code/riviera/subscriptions/opml"

Package opml implements functions capable of parsing opml files containing a list of feed subscriptions.

Index

Package Files

opml.go

type Body Uses

type Body struct {
    Outline []Outline `xml:"outline"`
}
type Head struct {
    Title string `xml:"title"`
}

type Opml Uses

type Opml struct {
    XMLName struct{} `xml:"opml"`
    Version string   `xml:"version,attr"`
    Head    Head     `xml:"head"`
    Body    Body     `xml:"body"`
}

func Load Uses

func Load(path string) (doc Opml, err error)

Load parses the OPML file at the path.

func Read Uses

func Read(r io.Reader) (doc Opml, err error)

Read parses an OPML document.

func (Opml) WriteTo Uses

func (doc Opml) WriteTo(w io.Writer) error

WriteTo writes the OPML document out.

type Outline Uses

type Outline struct {
    Type   string `xml:"type,attr,omitempty"`
    Text   string `xml:"text,attr,omitempty"`
    XMLURL string `xml:"xmlUrl,attr,omitempty"`

    // description is the top-level description element from the feed.
    Description string `xml:"description,attr,omitempty"`

    // htmlUrl is the top-level link element.
    HTMLURL string `xml:"htmlUrl,attr,omitempty"`

    // language is the value of the top-level language element.
    Language string `xml:"language,attr,omitempty"`

    // title is probably the same as text, it should not be omitted. title
    // contains the top-level title element from the feed.
    Title string `xml:"title,attr,omitempty"`
}

Package opml imports 4 packages (graph) and is imported by 8 packages. Updated 2017-12-27. Refresh now. Tools for package owners.