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.


Package Files


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) Encode Uses

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

Encode 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 2019-04-25. Refresh now. Tools for package owners.