mirror of
https://shylinux.com/x/icebergs
synced 2025-04-25 17:18:05 +08:00
add some
This commit is contained in:
parent
cd5882b2ee
commit
85e1f1dcb6
@ -162,6 +162,7 @@ const (
|
|||||||
USR_LOCAL = ice.USR_LOCAL
|
USR_LOCAL = ice.USR_LOCAL
|
||||||
USR_LOCAL_WORK = ice.USR_LOCAL_WORK
|
USR_LOCAL_WORK = ice.USR_LOCAL_WORK
|
||||||
USR_IMAGE = "usr/image/"
|
USR_IMAGE = "usr/image/"
|
||||||
|
USR_MATERIAL = "usr/material/"
|
||||||
USR_LOCAL_IMAGE = "usr/local/image/"
|
USR_LOCAL_IMAGE = "usr/local/image/"
|
||||||
USR_LEARNING_PORTAL = "usr/learning/portal/"
|
USR_LEARNING_PORTAL = "usr/learning/portal/"
|
||||||
USR_MODULES = "usr/node_modules/"
|
USR_MODULES = "usr/node_modules/"
|
||||||
|
@ -22,8 +22,9 @@ func init() {
|
|||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
IMAGE: {Name: "image path", Help: "图片", Actions: ice.Actions{
|
IMAGE: {Name: "image path", Help: "图片", Actions: ice.Actions{
|
||||||
"material": {Hand: func(m *ice.Message, arg ...string) {
|
"material": {Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Info("what %v", m.FormatChain())
|
if nfs.Exists(m, nfs.USR_MATERIAL) {
|
||||||
m.Cmdy(IMAGE, path.Join("usr/material", strings.TrimPrefix(path.Dir(m.Option("_script")), "usr/"), arg[0]))
|
m.Cmdy(IMAGE, path.Join(nfs.USR_MATERIAL, strings.TrimPrefix(path.Dir(m.Option("_script")), nfs.USR), arg[0]))
|
||||||
|
}
|
||||||
}},
|
}},
|
||||||
}, Hand: func(m *ice.Message, arg ...string) {
|
}, Hand: func(m *ice.Message, arg ...string) {
|
||||||
arg = _name(m, arg)
|
arg = _name(m, arg)
|
||||||
|
@ -5,6 +5,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
ice "shylinux.com/x/icebergs"
|
ice "shylinux.com/x/icebergs"
|
||||||
|
"shylinux.com/x/icebergs/base/nfs"
|
||||||
)
|
)
|
||||||
|
|
||||||
const VIDEO = "video"
|
const VIDEO = "video"
|
||||||
@ -13,7 +14,9 @@ func init() {
|
|||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
VIDEO: {Name: "video path", Help: "视频", Actions: ice.Actions{
|
VIDEO: {Name: "video path", Help: "视频", Actions: ice.Actions{
|
||||||
"material": {Hand: func(m *ice.Message, arg ...string) {
|
"material": {Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Cmdy(VIDEO, path.Join("usr/material", strings.TrimPrefix(path.Dir(m.Option("_script")), "usr/"), arg[0]))
|
if nfs.Exists(m, nfs.USR_MATERIAL) {
|
||||||
|
m.Cmdy(VIDEO, path.Join(nfs.USR_MATERIAL, strings.TrimPrefix(path.Dir(m.Option("_script")), nfs.USR), arg[0]))
|
||||||
|
}
|
||||||
}},
|
}},
|
||||||
}, Hand: func(m *ice.Message, arg ...string) {
|
}, Hand: func(m *ice.Message, arg ...string) {
|
||||||
arg = _name(m, arg)
|
arg = _name(m, arg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user