engine

package
v0.0.0-...-9302559 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2018 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var YoudaoKeys = []Youdao{
	{
		KeyFrom: "CoderVar",
		Key:     "802458398",
	},
	{
		KeyFrom: "whatMean",
		Key:     "1933652137",
	},
	{
		KeyFrom: "chinacache",
		Key:     "1247577973",
	},
	{
		KeyFrom: "huipblog",
		Key:     "439918742",
	},
	{
		KeyFrom: "chinacache",
		Key:     "1247577973",
	},
	{
		KeyFrom: "fanyi-node",
		Key:     "593554388",
	},
	{
		KeyFrom: "wbinglee",
		Key:     "1127870837",
	},
	{
		KeyFrom: "forum3",
		Key:     "1268771022",
	},
	{
		KeyFrom: "node-translator",
		Key:     "2058911035",
	},
	{
		KeyFrom: "kaiyao-robot",
		Key:     "2016811247",
	},
	{
		KeyFrom: "stone2083",
		Key:     "1576383390",
	},
	{
		KeyFrom: "myWebsite",
		Key:     "423366321",
	},
	{
		KeyFrom: "leecade",
		Key:     "54015339",
	},
	{
		KeyFrom: "github-wdict",
		Key:     "619541059",
	},
	{
		KeyFrom: "lanyuejin",
		Key:     "2033774719",
	},
}

Functions

This section is empty.

Types

type Bing

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

func NewBing

func NewBing(query string, style string) *Bing

func (*Bing) Query

func (b *Bing) Query() string

func (*Bing) WFOutput

func (b *Bing) WFOutput() string

WorkflowOutput got the output fmt for alfred.

type EngAlfResult

type EngAlfResult struct {
	Items []*WFItem `json:"items"`
}

EngAlfResult describe a workflow item.

type Engine

type Engine interface {
	Query() string
	// output for alfred workflow
	WFOutput() string
}

type Iciba

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

func NewIciba

func NewIciba(query, style string) *Iciba

func (*Iciba) Query

func (i *Iciba) Query() string

func (*Iciba) WFOutput

func (i *Iciba) WFOutput() string

WorkflowOutput got the output fmt for alfred.

type IcibaResult

type IcibaResult struct {
	Key         string   `xml:"key"`
	Ps          []string `xml:"ps"`
	Pos         []string `xml:"pos"`
	Acceptation []string `xml:"acceptation"`
	Sent        []struct {
		Orig  string `xml:"orig"`
		Trans string `xml:"trans"`
	} `xml:"sent"`
	// contains filtered or unexported fields
}

func (*IcibaResult) Format

func (ir *IcibaResult) Format() string

format the result

type WFItem

type WFItem struct {
	Valid    bool   `json:"valid"`
	Type     string `json:"type"`
	Title    string `json:"title"`
	Subtitle string `json:"subtitle"`
	Arg      string `json:"arg"`
	Icon     struct {
		Type string `json:"type"`
		Path string `json:"path"`
	} `json:"icon"`
}

workflow item for alfred 3 https://www.alfredapp.com/help/workflows/inputs/script-filter/json/ TODO: https://www.alfredapp.com/help/workflows/inputs/script-filter/xml/

type Youdao

type Youdao struct {
	KeyFrom string
	Key     string
	// contains filtered or unexported fields
}

func NewYoudao

func NewYoudao(query string, style string) *Youdao

生成一个Youdao词典引擎

func (*Youdao) Query

func (yd *Youdao) Query() string

查询

func (*Youdao) WFOutput

func (yd *Youdao) WFOutput() string

WorkflowOutput got the output fmt for alfred.

type YoudaoResult

type YoudaoResult struct {
	Basic       basic    `json:"basic"`
	ErrorCode   int      `json:"errorCode"`
	Query       string   `json:"query"`
	Translation []string `json:"translation"`
	Web         []web    `json:"web"`
	// contains filtered or unexported fields
}

结果集结构体

func (*YoudaoResult) Format

func (yr *YoudaoResult) Format() string

main format

Jump to

Keyboard shortcuts

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