1
0
forked from x/ContextOS
This commit is contained in:
shaoying 2018-11-29 18:30:50 +08:00
parent ff94e470ad
commit ff116d5ed0
3 changed files with 14 additions and 8 deletions

View File

@ -6,6 +6,7 @@ install:
@go get github.com/nsf/termbox-go @go get github.com/nsf/termbox-go
@go get github.com/skip2/go-qrcode @go get github.com/skip2/go-qrcode
@go get github.com/gomarkdown/markdown @go get github.com/gomarkdown/markdown
@go get github.com/PuerkitoBio/goquery
go install $(BENCH) go install $(BENCH)
@date @date
# bench web.code.counter nmake 1 # bench web.code.counter nmake 1
@ -20,6 +21,10 @@ install_all: install
run: run:
etc/bootstrap.sh etc/bootstrap.sh
shy:
cp -r src/ ~/shycontext/
cp -r usr/template/ ~/shycontext/usr/
cp -r usr/librarys/ ~/shycontext/usr/
tar: tar:
[ -e tar ] || mkdir tar [ -e tar ] || mkdir tar

View File

@ -227,6 +227,7 @@ var Index = &ctx.Context{Name: "cli", Help: "管理中心",
msg := m msg := m
for k, v := range m.Confv("cmd_script").(map[string]interface{}) { for k, v := range m.Confv("cmd_script").(map[string]interface{}) {
if strings.HasSuffix(detail[0], "."+k) { if strings.HasSuffix(detail[0], "."+k) {
detail[0] = m.Sess("nfs").Cmd("path", detail[0]).Result(0)
detail = append([]string{v.(string)}, detail...) detail = append([]string{v.(string)}, detail...)
msg = m.Spawn(cli.target) msg = m.Spawn(cli.target)
break break

View File

@ -29,18 +29,18 @@ var Index = &ctx.Context{Name: "wiki", Help: "文档中心",
"componet_group": &ctx.Config{Name: "component_group", Value: "index", Help: "默认组件"}, "componet_group": &ctx.Config{Name: "component_group", Value: "index", Help: "默认组件"},
"componet": &ctx.Config{Name: "componet", Value: map[string]interface{}{ "componet": &ctx.Config{Name: "componet", Value: map[string]interface{}{
"index": []interface{}{ "index": []interface{}{
map[string]interface{}{"name": "head", "template": "head"}, map[string]interface{}{"componet_name": "head", "template": "head"},
map[string]interface{}{"name": "header", "template": "header"}, map[string]interface{}{"componet_name": "header", "template": "header"},
map[string]interface{}{"name": "list", "template": "list", map[string]interface{}{"componet_name": "list", "template": "list",
"context": "web.wiki", "command": "wiki_list", "arguments": []interface{}{"h2", "int_r"}, "componet_ctx": "web.wiki", "componet_cmd": "wiki_list", "arguments": []interface{}{"h2", "int_r"},
"pre_run": true, "pre_run": true,
}, },
map[string]interface{}{"name": "text", "template": "text", map[string]interface{}{"componet_name": "text", "template": "text",
"context": "web.wiki", "command": "wiki_body", "arguments": []interface{}{"@wiki_favor"}, "componet_ctx": "web.wiki", "componet_cmd": "wiki_body", "arguments": []interface{}{"@wiki_favor"},
"pre_run": true, "pre_run": true,
}, },
map[string]interface{}{"name": "footer", "template": "footer"}, map[string]interface{}{"componet_name": "footer", "template": "footer"},
map[string]interface{}{"name": "tail", "template": "tail"}, map[string]interface{}{"componet_name": "tail", "template": "tail"},
}, },
}, Help: "组件列表"}, }, Help: "组件列表"},
}, },