input

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZONE   = "zone"
	FILE   = "file"
	CODE   = "code"
	TEXT   = "text"
	WEIGHT = "weight"
)
View Source
const (
	WORD = "word"
	LINE = "line"
)
View Source
const INPUT = "input"
View Source
const (
	WUBI = "wubi"
)

Variables

View Source
var Index = &ice.Context{Name: INPUT, Help: "输入法",
	Configs: map[string]*ice.Config{
		INPUT: {Name: INPUT, Help: "输入法", Value: kit.Data(
			kit.MDB_STORE, path.Join(ice.USR_LOCAL_EXPORT, INPUT), kit.MDB_FSIZE, "200000",
			kit.MDB_LIMIT, "5000", kit.MDB_LEAST, "1000",
			kit.MDB_SHORT, "zone", kit.SSH_REPOS, "wubi-dict",
		)},
	},
	Commands: map[string]*ice.Command{
		ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Load() }},
		ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Save() }},

		WUBI: {Name: "wubi method=word,line code auto", Help: "五笔", Action: map[string]*ice.Action{
			mdb.INSERT: {Name: "insert zone=person text code weight", Help: "添加", Hand: func(m *ice.Message, arg ...string) {
				_input_push(m, kit.Select("person", m.Option(ZONE)), m.Option(TEXT), m.Option(CODE), m.Option(WEIGHT))
			}},
			mdb.EXPORT: {Name: "export file=usr/wubi-dict/person zone=person", Help: "导出", Hand: func(m *ice.Message, arg ...string) {

			}},
			mdb.IMPORT: {Name: "import file=usr/wubi-dict/person zone=", Help: "导入", Hand: func(m *ice.Message, arg ...string) {
				_input_load(m, kit.Select("usr/wubi-dict/person", m.Option(FILE)), m.Option(ZONE))
			}},
		}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
			_input_find(m, arg[0], arg[1], m.Option(mdb.CACHE_LIMIT))
		}},
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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