libs

package
v0.0.0-...-f7c1ee7 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2014 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Alg algType
)

algorithm name

View Source
var (
	HTTP *httplib
)

Functions

func CleanUpHtml

func CleanUpHtml(src string) string

func ConvertToUtf8

func ConvertToUtf8(src, encoding string) string

func GetHtmlCharset

func GetHtmlCharset(src string) string

func RegisterAlg

func RegisterAlg(name string, f algType)

func RetrieveTitleFromHtml

func RetrieveTitleFromHtml(src string) string

func SetAlg

func SetAlg(name string)

Types

type OupengAlg

type OupengAlg interface {
	RunAlg()
	Text() string
	Title() string
}

algrithom to extractor text from html

func NewSimple

func NewSimple(url string) OupengAlg

func NewTtr

func NewTtr(url string) OupengAlg

type Simple

type Simple struct {
	Url, RawContent string
	// contains filtered or unexported fields
}

func (*Simple) RunAlg

func (s *Simple) RunAlg()

run algorithm

func (*Simple) Text

func (s *Simple) Text() string

return text

func (*Simple) Title

func (s *Simple) Title() string

return title

type TTR

type TTR struct {
	Url, RawContent string
	// contains filtered or unexported fields
}

func (*TTR) RunAlg

func (t *TTR) RunAlg()

run algorithm

func (*TTR) Text

func (t *TTR) Text() string

return text

func (*TTR) Title

func (t *TTR) Title() string

return title

Jump to

Keyboard shortcuts

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