readability

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	URL        string
	Meta       Metadata
	Content    string
	RawContent string
}

Article is the content of an URL

func FromReader

func FromReader(reader io.Reader, url *nurl.URL) (Article, error)

FromReader get readable content from the specified io.Reader

func FromURL

func FromURL(url *nurl.URL, timeout time.Duration) (Article, error)

FromURL get readable content from the specified URL

type Metadata

type Metadata struct {
	Title       string
	Image       string
	Excerpt     string
	Author      string
	MinReadTime int
	MaxReadTime int
}

Metadata is metadata of an article

Jump to

Keyboard shortcuts

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