rule

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PowerfulFind added in v0.0.3

func PowerfulFind(s *goquery.Selection, q string) *goquery.Selection

func RunRule added in v0.0.4

func RunRule(r Rule) []string

Types

type Fun added in v0.0.3

type Fun struct {
	Name   string
	Raw    string
	Params []string

	Document  *goquery.Document
	Selection *goquery.Selection
	Result    string

	PrevFun *Fun
	NextFun *Fun
}

func ParseFun added in v0.0.3

func ParseFun(sel *goquery.Selection, str string) *Fun

func (*Fun) Append added in v0.0.3

func (f *Fun) Append(s string) (*Fun, *Fun)

func (*Fun) InitSelector added in v0.0.3

func (f *Fun) InitSelector() error

func (*Fun) Invoke added in v0.0.3

func (f *Fun) Invoke() (string, error)

type Result

type Result struct {
	Name   string
	Mode   string
	Result []string
}

type Rule

type Rule struct {
	Name string `yaml:"name"`
	When string `yaml:"when"`
	Mode string `yaml:"mode"`
	Page struct {
		URL  string            `yaml:"url"`
		List string            `yaml:"list"`
		Item map[string]string `yaml:"item"`
	}
}

Jump to

Keyboard shortcuts

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