fileconf

package
v0.0.0-...-b292b7d Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCommentLine error = fmt.Errorf("line is comment")
	ErrEmptyLine         = fmt.Errorf("emty line")
	ErrEmptyRule         = fmt.Errorf("emty rule")
)

Functions

This section is empty.

Types

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func New

func New(rules []*Rule) *Parser

func NewFromFile

func NewFromFile(filepath string) (*Parser, error)

func (*Parser) IsArticle

func (p *Parser) IsArticle(_ string) bool

func (*Parser) Parse

func (p *Parser) Parse(rawurl string, in []byte) (*articler.Article, error)

type Rule

type Rule struct {
	Host string

	TitleSelector     string
	TextSelector      string
	PublishedSelector string
}

Jump to

Keyboard shortcuts

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