1
0
forked from x/icebergs
This commit is contained in:
harveyshao 2022-12-03 13:46:12 +08:00
parent 261ef042b9
commit 583b820e65
11 changed files with 18 additions and 15 deletions

View File

@ -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",

View File

@ -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)
}},

View File

@ -1,8 +1,8 @@
package chat
import (
"sync"
"net/http"
"sync"
ice "shylinux.com/x/icebergs"
"shylinux.com/x/icebergs/base/aaa"

View File

@ -1,8 +1,8 @@
package oauth
import (
"path"
"net/http"
"path"
"strings"
"time"

View File

@ -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())},
})
}
}

View File

@ -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)

View File

@ -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{}

View File

@ -58,6 +58,7 @@ func transArgKey(arg []string) []string {
}
return arg
}
const TABLE = "table"
func init() {

View File

@ -1,8 +1,8 @@
package chrome
import (
"path"
"net/http"
"path"
"shylinux.com/x/ice"
"shylinux.com/x/icebergs/base/mdb"

View File

@ -1,8 +1,8 @@
package mp
import (
"net/http"
"encoding/base64"
"net/http"
"time"
ice "shylinux.com/x/icebergs"

View File

@ -1,8 +1,8 @@
package wx
import (
"net/http"
"crypto/sha1"
"net/http"
"strings"
"time"