forked from x/icebergs
opt base
This commit is contained in:
parent
261ef042b9
commit
583b820e65
@ -136,7 +136,7 @@ func init() {
|
||||
Index.MergeCommands(ice.Commands{
|
||||
CAT: {Name: "cat path auto", Help: "文件", Actions: ice.MergeActions(ice.Actions{
|
||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) { aaa.White(m, ice.SRC_MAIN_JS, ice.SRC_MAIN_GO, ice.SRC_MAIN_SHY) }},
|
||||
}, ctx.ConfAction(SOURCE, kit.DictList(
|
||||
}, mdb.AutoConfig(SOURCE, kit.DictList(
|
||||
HTML, CSS, JS, GO, SH, SHY, CSV, JSON,
|
||||
PY, MD, TXT, XML, YML, ZML, IML,
|
||||
"license", "makefile", "configure", "conf",
|
||||
|
@ -206,7 +206,7 @@ func init() {
|
||||
PP(ice.REQUIRE): {Name: "/require/shylinux.com/x/volcanos/proto.js", Help: "代码库", Hand: func(m *ice.Message, arg ...string) {
|
||||
p := path.Join(ice.ISH_PLUGED, path.Join(arg...))
|
||||
if !nfs.ExistsFile(m, p) {
|
||||
m.Cmd(cli.SYSTEM, "git", "clone", "https://"+path.Join(arg[:3]...), path.Join(ice.ISH_PLUGED, path.Join(arg[:3])))
|
||||
m.Cmd(cli.SYSTEM, "git", "clone", "https://"+path.Join(arg[:3]...), path.Join(ice.ISH_PLUGED, path.Join(arg[:3]...)))
|
||||
}
|
||||
m.RenderDownload(p)
|
||||
}},
|
||||
|
@ -1,8 +1,8 @@
|
||||
package chat
|
||||
|
||||
import (
|
||||
"sync"
|
||||
"net/http"
|
||||
"sync"
|
||||
|
||||
ice "shylinux.com/x/icebergs"
|
||||
"shylinux.com/x/icebergs/base/aaa"
|
||||
|
@ -1,8 +1,8 @@
|
||||
package oauth
|
||||
|
||||
import (
|
||||
"path"
|
||||
"net/http"
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package code
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"path"
|
||||
|
||||
"strings"
|
||||
|
||||
ice "shylinux.com/x/icebergs"
|
||||
"shylinux.com/x/icebergs/base/ctx"
|
||||
"shylinux.com/x/icebergs/base/mdb"
|
||||
@ -57,7 +57,7 @@ func _css_show(m *ice.Message, arg ...string) {
|
||||
}
|
||||
func _css_exec(m *ice.Message, arg ...string) {
|
||||
if arg[2] == "usr/volcanos/" && strings.HasPrefix(arg[1], "plugin/local/") {
|
||||
key := "web."+strings.ReplaceAll(strings.TrimSuffix(strings.TrimPrefix(arg[1], "plugin/local/"), ".css"), ice.PS, ice.PT)
|
||||
key := "web." + strings.ReplaceAll(strings.TrimSuffix(strings.TrimPrefix(arg[1], "plugin/local/"), ".css"), ice.PS, ice.PT)
|
||||
ctx.ProcessCommand(m, kit.Select("can.plugin", key), kit.Simple())
|
||||
return
|
||||
}
|
||||
@ -72,4 +72,4 @@ func init() {
|
||||
mdb.ENGINE: {Hand: func(m *ice.Message, arg ...string) { _css_exec(m, arg...) }},
|
||||
}, PlugAction(), LangAction())},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,9 @@ func init() {
|
||||
mdb.MODIFY: {Name: "modify zone type name text price count image=4@img audio video"},
|
||||
mdb.CREATE: {Name: "modify zone type name text price count image=4@img audio video"},
|
||||
web.UPLOAD: {Hand: func(m *ice.Message, arg ...string) { web.Upload(m) }},
|
||||
"copy": {Hand: func(m *ice.Message, arg ...string) { m.Cmd("", mdb.CREATE, m.OptionSimple("zone,type,name,text,price,count,image")) }},
|
||||
"copy": {Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmd("", mdb.CREATE, m.OptionSimple("zone,type,name,text,price,count,image"))
|
||||
}},
|
||||
}, mdb.HashAction(mdb.FIELD, "time,hash,zone,type,name,text,price,count,image,audio,video")), Hand: func(m *ice.Message, arg ...string) {
|
||||
if mdb.HashSelect(m, arg...); len(arg) == 0 || arg[0] == "" {
|
||||
m.Action(mdb.CREATE, mdb.EXPORT, mdb.IMPORT)
|
||||
|
@ -74,9 +74,9 @@ func init() {
|
||||
mdb.ZoneInsert(m, arg[:2], BEGIN_TIME, m.Time(), STATUS, PREPARE, LEVEL, 3, SCORE, 3, arg[2:])
|
||||
}},
|
||||
mdb.MODIFY: {Hand: func(m *ice.Message, arg ...string) { _task_modify(m, arg[0], arg[1], arg[2:]...) }},
|
||||
CANCEL: {Name: "cancal", Hand: func(m *ice.Message, arg ...string) { _task_modify(m, STATUS, CANCEL) }},
|
||||
BEGIN: {Name: "begin", Hand: func(m *ice.Message, arg ...string) { _task_modify(m, STATUS, PROCESS) }},
|
||||
END: {Name: "end", Hand: func(m *ice.Message, arg ...string) { _task_modify(m, STATUS, FINISH) }},
|
||||
CANCEL: {Name: "cancal", Hand: func(m *ice.Message, arg ...string) { _task_modify(m, STATUS, CANCEL) }},
|
||||
BEGIN: {Name: "begin", Hand: func(m *ice.Message, arg ...string) { _task_modify(m, STATUS, PROCESS) }},
|
||||
END: {Name: "end", Hand: func(m *ice.Message, arg ...string) { _task_modify(m, STATUS, FINISH) }},
|
||||
}, mdb.ZoneAction(mdb.FIELD, "begin_time,close_time,id,status,level,score,type,name,text")), Hand: func(m *ice.Message, arg ...string) {
|
||||
if mdb.ZoneSelect(m, arg...); len(arg) > 0 && arg[0] != "" {
|
||||
status := map[string]int{}
|
||||
|
@ -58,6 +58,7 @@ func transArgKey(arg []string) []string {
|
||||
}
|
||||
return arg
|
||||
}
|
||||
|
||||
const TABLE = "table"
|
||||
|
||||
func init() {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package chrome
|
||||
|
||||
import (
|
||||
"path"
|
||||
"net/http"
|
||||
"path"
|
||||
|
||||
"shylinux.com/x/ice"
|
||||
"shylinux.com/x/icebergs/base/mdb"
|
||||
|
@ -1,8 +1,8 @@
|
||||
package mp
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"encoding/base64"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
ice "shylinux.com/x/icebergs"
|
||||
|
@ -1,8 +1,8 @@
|
||||
package wx
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"crypto/sha1"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user