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{
|
Index.MergeCommands(ice.Commands{
|
||||||
CAT: {Name: "cat path auto", Help: "文件", Actions: ice.MergeActions(ice.Actions{
|
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) }},
|
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,
|
HTML, CSS, JS, GO, SH, SHY, CSV, JSON,
|
||||||
PY, MD, TXT, XML, YML, ZML, IML,
|
PY, MD, TXT, XML, YML, ZML, IML,
|
||||||
"license", "makefile", "configure", "conf",
|
"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) {
|
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...))
|
p := path.Join(ice.ISH_PLUGED, path.Join(arg...))
|
||||||
if !nfs.ExistsFile(m, p) {
|
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)
|
m.RenderDownload(p)
|
||||||
}},
|
}},
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package chat
|
package chat
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"sync"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"sync"
|
||||||
|
|
||||||
ice "shylinux.com/x/icebergs"
|
ice "shylinux.com/x/icebergs"
|
||||||
"shylinux.com/x/icebergs/base/aaa"
|
"shylinux.com/x/icebergs/base/aaa"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package oauth
|
package oauth
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"path"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package code
|
package code
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
|
||||||
"path"
|
"path"
|
||||||
|
"strings"
|
||||||
|
|
||||||
ice "shylinux.com/x/icebergs"
|
ice "shylinux.com/x/icebergs"
|
||||||
"shylinux.com/x/icebergs/base/ctx"
|
"shylinux.com/x/icebergs/base/ctx"
|
||||||
"shylinux.com/x/icebergs/base/mdb"
|
"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) {
|
func _css_exec(m *ice.Message, arg ...string) {
|
||||||
if arg[2] == "usr/volcanos/" && strings.HasPrefix(arg[1], "plugin/local/") {
|
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())
|
ctx.ProcessCommand(m, kit.Select("can.plugin", key), kit.Simple())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -72,4 +72,4 @@ func init() {
|
|||||||
mdb.ENGINE: {Hand: func(m *ice.Message, arg ...string) { _css_exec(m, arg...) }},
|
mdb.ENGINE: {Hand: func(m *ice.Message, arg ...string) { _css_exec(m, arg...) }},
|
||||||
}, PlugAction(), LangAction())},
|
}, PlugAction(), LangAction())},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,9 @@ func init() {
|
|||||||
mdb.MODIFY: {Name: "modify zone type name text price count image=4@img audio video"},
|
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"},
|
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) }},
|
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) {
|
}, 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] == "" {
|
if mdb.HashSelect(m, arg...); len(arg) == 0 || arg[0] == "" {
|
||||||
m.Action(mdb.CREATE, mdb.EXPORT, mdb.IMPORT)
|
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.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:]...) }},
|
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) }},
|
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) }},
|
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) }},
|
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) {
|
}, 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] != "" {
|
if mdb.ZoneSelect(m, arg...); len(arg) > 0 && arg[0] != "" {
|
||||||
status := map[string]int{}
|
status := map[string]int{}
|
||||||
|
@ -58,6 +58,7 @@ func transArgKey(arg []string) []string {
|
|||||||
}
|
}
|
||||||
return arg
|
return arg
|
||||||
}
|
}
|
||||||
|
|
||||||
const TABLE = "table"
|
const TABLE = "table"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package chrome
|
package chrome
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"path"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"path"
|
||||||
|
|
||||||
"shylinux.com/x/ice"
|
"shylinux.com/x/ice"
|
||||||
"shylinux.com/x/icebergs/base/mdb"
|
"shylinux.com/x/icebergs/base/mdb"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package mp
|
package mp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
ice "shylinux.com/x/icebergs"
|
ice "shylinux.com/x/icebergs"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package wx
|
package wx
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
|
||||||
"crypto/sha1"
|
"crypto/sha1"
|
||||||
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user