mirror of
https://shylinux.com/x/icebergs
synced 2025-04-27 01:48:27 +08:00
opt some
This commit is contained in:
parent
9b437752af
commit
dded350e0d
@ -56,7 +56,7 @@ func init() {
|
|||||||
SYSTEM: {Name: "system", Help: "系统命令", Value: kit.Data()},
|
SYSTEM: {Name: "system", Help: "系统命令", Value: kit.Data()},
|
||||||
},
|
},
|
||||||
Commands: map[string]*ice.Command{
|
Commands: map[string]*ice.Command{
|
||||||
SYSTEM: {Name: "system cmd arg", Help: "系统命令", Hand: func(m *ice.Message, c *ice.Context, key string, arg ...string) {
|
SYSTEM: {Name: "system cmd 执行:button 清空:button", Help: "系统命令", Hand: func(m *ice.Message, c *ice.Context, key string, arg ...string) {
|
||||||
cmd := exec.Command(arg[0], arg[1:]...)
|
cmd := exec.Command(arg[0], arg[1:]...)
|
||||||
|
|
||||||
// 运行目录
|
// 运行目录
|
||||||
|
@ -83,7 +83,7 @@ func _command_make(m *ice.Message, cmd *ice.Command) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(cmd.List) == 0 {
|
if len(cmd.List) == 0 {
|
||||||
cmd.List = append(cmd.List, kit.List(kit.MDB_INPUT, "text", "name", "name")...)
|
cmd.List = append(cmd.List, kit.List(kit.MDB_INPUT, "text", "name", "path")...)
|
||||||
}
|
}
|
||||||
if !button {
|
if !button {
|
||||||
cmd.List = append(cmd.List, kit.List(kit.MDB_INPUT, "button", "name", "查看")...)
|
cmd.List = append(cmd.List, kit.List(kit.MDB_INPUT, "button", "name", "查看")...)
|
||||||
|
@ -175,6 +175,14 @@ func init() {
|
|||||||
ORDER: {Name: "order cmd...", Help: "定制", Hand: func(m *ice.Message, arg ...string) {
|
ORDER: {Name: "order cmd...", Help: "定制", Hand: func(m *ice.Message, arg ...string) {
|
||||||
_action_order_list(m, m.Option(ice.MSG_RIVER), m.Option(ice.MSG_STORM), arg...)
|
_action_order_list(m, m.Option(ice.MSG_RIVER), m.Option(ice.MSG_STORM), arg...)
|
||||||
}},
|
}},
|
||||||
|
|
||||||
|
"command": {Name: "command", Help: "命令", Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
if len(arg) == 1 {
|
||||||
|
m.Cmdy(ctx.COMMAND, arg[0])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
m.Cmdy(arg[0], arg[1:])
|
||||||
|
}},
|
||||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
if len(arg) == 0 {
|
if len(arg) == 0 {
|
||||||
// 命令列表
|
// 命令列表
|
||||||
|
@ -24,6 +24,9 @@ func _go_find(m *ice.Message, key string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
func _go_tags(m *ice.Message, key string) {
|
func _go_tags(m *ice.Message, key string) {
|
||||||
|
ls := strings.Split(key, ".")
|
||||||
|
key = ls[len(ls)-1]
|
||||||
|
|
||||||
if _, e := os.Stat(path.Join(m.Option("_path"), ".tags")); e != nil {
|
if _, e := os.Stat(path.Join(m.Option("_path"), ".tags")); e != nil {
|
||||||
m.Cmd(cli.SYSTEM, "gotags", "-R", "-f", ".tags", "./")
|
m.Cmd(cli.SYSTEM, "gotags", "-R", "-f", ".tags", "./")
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ func _inner_list(m *ice.Message, ext, file, dir string, arg ...string) {
|
|||||||
func init() {
|
func init() {
|
||||||
Index.Merge(&ice.Context{
|
Index.Merge(&ice.Context{
|
||||||
Commands: map[string]*ice.Command{
|
Commands: map[string]*ice.Command{
|
||||||
INNER: {Name: "inner path=usr/demo file=hi.sh line=1 查看:button=auto", Help: "编辑器", Meta: kit.Dict(
|
INNER: {Name: "inner path=usr/demo file=hi.sh line=1 auto", Help: "编辑器", Meta: kit.Dict(
|
||||||
"display", "/plugin/local/code/inner.js", "style", "editor",
|
"display", "/plugin/local/code/inner.js", "style", "editor",
|
||||||
), Action: map[string]*ice.Action{
|
), Action: map[string]*ice.Action{
|
||||||
web.UPLOAD: {Name: "upload path name", Help: "上传", Hand: func(m *ice.Message, arg ...string) {
|
web.UPLOAD: {Name: "upload path name", Help: "上传", Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
@ -248,7 +248,7 @@ var Index = &ice.Context{Name: "mall", Help: "贸易中心",
|
|||||||
}},
|
}},
|
||||||
ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Save(ASSET) }},
|
ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Save(ASSET) }},
|
||||||
|
|
||||||
ASSET: {Name: "asset account=auto id=auto auto 支出:button 转账:button 收入:button 导出:button 导入:button", Help: "资产", Meta: kit.Dict(
|
ASSET: {Name: "asset account=auto id=auto auto 支出:button 转账:button 收入:button", Help: "资产", Meta: kit.Dict(
|
||||||
"支出", _input_spend, "转账", _input_trans, "收入", _input_bonus,
|
"支出", _input_spend, "转账", _input_trans, "收入", _input_bonus,
|
||||||
), Action: map[string]*ice.Action{
|
), Action: map[string]*ice.Action{
|
||||||
"spend": {Name: "insert [key value]...", Help: "支出", Hand: func(m *ice.Message, arg ...string) {
|
"spend": {Name: "insert [key value]...", Help: "支出", Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
@ -200,16 +200,26 @@ func _task_action(m *ice.Message, status interface{}, action ...string) string {
|
|||||||
}
|
}
|
||||||
return strings.Join(action, "")
|
return strings.Join(action, "")
|
||||||
}
|
}
|
||||||
func _task_input(m *ice.Message, key, value string) {
|
func _task_input(m *ice.Message, field, value string) {
|
||||||
switch key {
|
switch field {
|
||||||
case "zone":
|
case "zone":
|
||||||
m.Richs(TASK, kit.Keys(kit.MDB_HASH, m.Optionv(ice.MSG_DOMAIN)), kit.MDB_FOREACH, func(key string, val map[string]interface{}) {
|
m.Richs(TASK, kit.Keys(kit.MDB_HASH, m.Optionv(ice.MSG_DOMAIN)), kit.MDB_FOREACH, func(key string, val map[string]interface{}) {
|
||||||
m.Push("zone", kit.Value(val, "meta.zone"))
|
m.Push("zone", kit.Value(val, "meta.zone"))
|
||||||
m.Push("count", kit.Select("0", kit.Format(kit.Value(val, "meta.count"))))
|
m.Push("count", kit.Select("0", kit.Format(kit.Value(val, "meta.count"))))
|
||||||
})
|
})
|
||||||
m.Sort("count", "int_r")
|
m.Sort("count", "int_r")
|
||||||
case "name":
|
case "name", "text":
|
||||||
case "text":
|
list := map[string]int{}
|
||||||
|
m.Richs(TASK, kit.Keys(kit.MDB_HASH, m.Optionv(ice.MSG_DOMAIN)), kit.MDB_FOREACH, func(key string, val map[string]interface{}) {
|
||||||
|
m.Grows(TASK, kit.Keys(kit.MDB_HASH, m.Optionv(ice.MSG_DOMAIN), kit.MDB_HASH, key), "", "", func(index int, value map[string]interface{}) {
|
||||||
|
list[kit.Format(value[field])]++
|
||||||
|
})
|
||||||
|
})
|
||||||
|
for k, i := range list {
|
||||||
|
m.Push("key", k)
|
||||||
|
m.Push("count", i)
|
||||||
|
}
|
||||||
|
m.Sort("count", "int_r")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func _task_scope(m *ice.Message, arg ...string) (time.Time, time.Time) {
|
func _task_scope(m *ice.Message, arg ...string) (time.Time, time.Time) {
|
||||||
@ -298,7 +308,7 @@ var Index = &ice.Context{Name: "team", Help: "团队中心",
|
|||||||
}},
|
}},
|
||||||
ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Save(TASK) }},
|
ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Save(TASK) }},
|
||||||
|
|
||||||
TASK: {Name: "task zone=auto id=auto auto 添加:button 导出:button 导入:button", Help: "任务", Meta: kit.Dict(
|
TASK: {Name: "task zone=auto id=auto auto 添加:button", Help: "任务", Meta: kit.Dict(
|
||||||
"添加", _task_inputs,
|
"添加", _task_inputs,
|
||||||
), Action: map[string]*ice.Action{
|
), Action: map[string]*ice.Action{
|
||||||
mdb.INSERT: {Name: "insert [key value]...", Help: "添加", Hand: func(m *ice.Message, arg ...string) {
|
mdb.INSERT: {Name: "insert [key value]...", Help: "添加", Hand: func(m *ice.Message, arg ...string) {
|
||||||
@ -350,7 +360,7 @@ var Index = &ice.Context{Name: "team", Help: "团队中心",
|
|||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
PLAN: {Name: "plan scale:select=day|week|month|year|long begin_time=@date auto 添加:button", Help: "计划", Meta: kit.Dict(
|
PLAN: {Name: "plan scale:select=day|week|month|year|long begin_time=@date auto 添加:button", Help: "计划", Meta: kit.Dict(
|
||||||
mdb.INSERT, _task_inputs,
|
"添加", _task_inputs,
|
||||||
"display", "/plugin/local/team/plan.js", "detail", []string{StatusPrepare, StatusProcess, StatusCancel, StatusFinish},
|
"display", "/plugin/local/team/plan.js", "detail", []string{StatusPrepare, StatusProcess, StatusCancel, StatusFinish},
|
||||||
), Action: map[string]*ice.Action{
|
), Action: map[string]*ice.Action{
|
||||||
mdb.INSERT: {Name: "insert [key value]...", Help: "添加", Hand: func(m *ice.Message, arg ...string) {
|
mdb.INSERT: {Name: "insert [key value]...", Help: "添加", Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
title "飞书机器人"
|
title "飞书机器人"
|
||||||
|
|
||||||
refer "官网" `
|
refer "官网" `
|
||||||
官网 https://www.feishu.cn/
|
官网 https://www.feishu.cn/
|
||||||
应用管理 https://open.feishu.cn/app
|
应用管理 https://open.feishu.cn/app
|
||||||
@ -7,6 +6,7 @@ refer "官网" `
|
|||||||
文档 https://open.feishu.cn/document/uQjL04CN/ucDOz4yN4MjL3gzM
|
文档 https://open.feishu.cn/document/uQjL04CN/ucDOz4yN4MjL3gzM
|
||||||
源码 https://github.com/shylinux/icebergs/blob/master/misc/lark/lark.go
|
源码 https://github.com/shylinux/icebergs/blob/master/misc/lark/lark.go
|
||||||
`
|
`
|
||||||
|
image qrcode `https://www.feishu.cn/`
|
||||||
|
|
||||||
chapter "应用"
|
chapter "应用"
|
||||||
field "ship" web.chat.lark.ship
|
field "ship" web.chat.lark.ship
|
||||||
@ -16,5 +16,4 @@ chapter "项目"
|
|||||||
section "icebergs"
|
section "icebergs"
|
||||||
field "icebergs_统计" web.code.git.trend args `[ icebergs ]` action `{ height 200 speed 20 }`
|
field "icebergs_统计" web.code.git.trend args `[ icebergs ]` action `{ height 200 speed 20 }`
|
||||||
field "icebergs_源码" web.code.inner args `[ usr/icebergs misc/lark/lark.go 74 ]`
|
field "icebergs_源码" web.code.inner args `[ usr/icebergs misc/lark/lark.go 74 ]`
|
||||||
field "icebergs_项目" web.code.git.spide args `[ icebergs ]`
|
|
||||||
|
|
||||||
|
@ -5,12 +5,14 @@ refer "" `
|
|||||||
文档 https://developers.weixin.qq.com/miniprogram/dev/api/
|
文档 https://developers.weixin.qq.com/miniprogram/dev/api/
|
||||||
源码 https://github.com/shylinux/icebergs/blob/master/misc/mp/mp.go
|
源码 https://github.com/shylinux/icebergs/blob/master/misc/mp/mp.go
|
||||||
`
|
`
|
||||||
|
image qrcode `https://weixin.qq.com`
|
||||||
|
|
||||||
chapter "应用"
|
chapter "应用"
|
||||||
|
field "asset" web.mall.asset args `[ ]`
|
||||||
|
field "task" web.team.task args `[ ]`
|
||||||
|
|
||||||
chapter "项目"
|
chapter "项目"
|
||||||
section "icebergs"
|
section "icebergs"
|
||||||
field "icebergs_统计" web.code.git.trend args `[ icebergs ]` action `{ height 200 speed 20 }`
|
field "icebergs_统计" web.code.git.trend args `[ icebergs ]` action `{ height 200 speed 20 }`
|
||||||
field "icebergs_源码" web.code.inner args `[ usr/icebergs misc/mp/mp.go 1 ]`
|
field "icebergs_源码" web.code.inner args `[ usr/icebergs misc/mp/mp.go 1 ]`
|
||||||
field "icebergs_项目" web.code.git.spide args `[ icebergs ]`
|
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
title "微信公众号"
|
title "微信公众号"
|
||||||
|
|
||||||
refer "" `
|
refer "" `
|
||||||
官网 https://weixin.qq.com/
|
官网 https://weixin.qq.com/
|
||||||
后台 https://mp.weixin.qq.com/
|
后台 https://mp.weixin.qq.com/
|
||||||
@ -8,16 +7,13 @@ refer "" `
|
|||||||
`
|
`
|
||||||
image qrcode `https://weixin.qq.com`
|
image qrcode `https://weixin.qq.com`
|
||||||
|
|
||||||
|
|
||||||
chapter "应用"
|
chapter "应用"
|
||||||
field "plan" web.team.plan args `[ ]`
|
field "runtime" cli.runtime
|
||||||
field "task" web.team.task args `[ ]`
|
|
||||||
field "asset" web.mall.asset args `[ ]`
|
field "asset" web.mall.asset args `[ ]`
|
||||||
|
field "task" web.team.task args `[ ]`
|
||||||
|
|
||||||
chapter "项目"
|
chapter "项目"
|
||||||
section "icebergs"
|
section "icebergs"
|
||||||
field "icebergs_统计" web.code.git.trend args `[ icebergs ]` action `{ height 200 speed 20 }`
|
field "icebergs 统计" web.code.git.trend args `[ icebergs ]` action `{ height 200 speed 20 }`
|
||||||
field "icebergs_源码" web.code.inner args `[ usr/icebergs misc/wx/wx.go 1 ]`
|
field "icebergs 源码" web.code.inner args `[ usr/icebergs misc/wx/wx.go 1 ]`
|
||||||
field "icebergs_项目" web.code.git.spide args `[ icebergs ]`
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user