mirror of
https://shylinux.com/x/icebergs
synced 2025-06-27 02:37:31 +08:00
mix github
This commit is contained in:
commit
60ddf0d12d
@ -27,7 +27,9 @@ func init() {
|
|||||||
m.Save(PASTE)
|
m.Save(PASTE)
|
||||||
}},
|
}},
|
||||||
|
|
||||||
PASTE: {Name: "paste text auto 添加:button", Help: "粘贴板", Action: map[string]*ice.Action{
|
PASTE: {Name: "paste text auto 添加:button", Help: "粘贴板", Meta: kit.Dict(
|
||||||
|
"display", "/plugin/story/paste",
|
||||||
|
), Action: map[string]*ice.Action{
|
||||||
mdb.INSERT: {Name: "insert type name text", Hand: func(m *ice.Message, arg ...string) {
|
mdb.INSERT: {Name: "insert type name text", Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Conf(PASTE, kit.Keys(kit.MDB_META, m.Option(ice.MSG_RIVER), m.Option(ice.MSG_STORM), kit.MDB_META, kit.MDB_SHORT), kit.MDB_TEXT)
|
m.Conf(PASTE, kit.Keys(kit.MDB_META, m.Option(ice.MSG_RIVER), m.Option(ice.MSG_STORM), kit.MDB_META, kit.MDB_SHORT), kit.MDB_TEXT)
|
||||||
|
|
||||||
|
@ -198,6 +198,7 @@ func (b *Chain) Init(m *ice.Message, arg ...string) Chart {
|
|||||||
b.MarginX = kit.Int(m.Option("marginx"))
|
b.MarginX = kit.Int(m.Option("marginx"))
|
||||||
b.MarginY = kit.Int(m.Option("marginy"))
|
b.MarginY = kit.Int(m.Option("marginy"))
|
||||||
|
|
||||||
|
m.Debug("what %v", arg)
|
||||||
// 解析数据
|
// 解析数据
|
||||||
b.data = kit.Parse(nil, "", b.show(m, arg[0])...).(map[string]interface{})
|
b.data = kit.Parse(nil, "", b.show(m, arg[0])...).(map[string]interface{})
|
||||||
|
|
||||||
@ -215,7 +216,7 @@ func (b *Chain) Draw(m *ice.Message, x, y int) Chart {
|
|||||||
}
|
}
|
||||||
func (b *Chain) show(m *ice.Message, str string) (res []string) {
|
func (b *Chain) show(m *ice.Message, str string) (res []string) {
|
||||||
miss := []int{}
|
miss := []int{}
|
||||||
for _, line := range kit.Split(str, "\n") {
|
for _, line := range kit.Split(str, "\n", "\n") {
|
||||||
// 计算缩进
|
// 计算缩进
|
||||||
dep := 0
|
dep := 0
|
||||||
loop:
|
loop:
|
||||||
@ -251,7 +252,7 @@ func (b *Chain) show(m *ice.Message, str string) (res []string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 输出节点
|
// 输出节点
|
||||||
word := kit.Split(line)
|
word := kit.Split(line, "\t ", "\t ")
|
||||||
res = append(res, "{", kit.MDB_META, "{", "text")
|
res = append(res, "{", kit.MDB_META, "{", "text")
|
||||||
res = append(res, word...)
|
res = append(res, word...)
|
||||||
res = append(res, "}", kit.MDB_LIST, "[")
|
res = append(res, "}", kit.MDB_LIST, "[")
|
||||||
|
3
meta.go
3
meta.go
@ -362,6 +362,9 @@ func (m *Message) Split(str string, field string, space string, enter string) *M
|
|||||||
indexs := []int{}
|
indexs := []int{}
|
||||||
fields := kit.Split(field, space, space, space)
|
fields := kit.Split(field, space, space, space)
|
||||||
for i, l := range kit.Split(str, enter, enter, enter) {
|
for i, l := range kit.Split(str, enter, enter, enter) {
|
||||||
|
if strings.HasPrefix(l, "Binary") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if strings.TrimSpace(l) == "" {
|
if strings.TrimSpace(l) == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user