mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-25 16:58:06 +08:00
add 20200202
This commit is contained in:
parent
2e989b8505
commit
42011b19bb
@ -7,7 +7,7 @@ syntax match kitConst "app\.[a-z0-9A-Z_.]*"
|
||||
|
||||
|
||||
highlight msgConst ctermfg=cyan
|
||||
syntax match msgConst "m\.[a-z0-9A-Z_.]*"
|
||||
syntax match msgConst "msg\.[a-z0-9A-Z_.]*"
|
||||
syntax match msgConst "sub\.[a-z0-9A-Z_.]*"
|
||||
syntax match msgConst "\Am\.[a-z0-9A-Z_.]*"
|
||||
syntax match msgConst "\Amsg\.[a-z0-9A-Z_.]*"
|
||||
syntax match msgConst "\Asub\.[a-z0-9A-Z_.]*"
|
||||
|
||||
|
2
go.mod
2
go.mod
@ -3,7 +3,7 @@ module miss
|
||||
go 1.13
|
||||
|
||||
require (
|
||||
github.com/shylinux/contexts v0.0.0-00010101000000-000000000000 // indirect
|
||||
github.com/shylinux/contexts v0.0.0-00010101000000-000000000000
|
||||
github.com/shylinux/icebergs v0.1.9
|
||||
github.com/shylinux/toolkits v0.1.0
|
||||
)
|
||||
|
29
miss.md
Normal file
29
miss.md
Normal file
@ -0,0 +1,29 @@
|
||||
# {{title "contexts"}}
|
||||
|
||||
## {{chapter "编程"}}
|
||||
{{table "编程" `
|
||||
原型 接口
|
||||
框架 模块
|
||||
`}}
|
||||
|
||||
## {{chapter "趋势"}}
|
||||
{{table "趋势" `
|
||||
模块化 contexts
|
||||
集群化 icebergs
|
||||
自动化 volcanos
|
||||
`}}
|
||||
|
||||
## {{chapter "网络"}}
|
||||
{{table "网络" `
|
||||
SPIDE SERVE SPACE DREAM
|
||||
FAVOR CACHE STORY SHARE
|
||||
ROUTE PROXY GROUP LABEL
|
||||
`}}
|
||||
|
||||
## {{chapter "图谱"}}
|
||||
{{table "图谱" `
|
||||
code wiki chat team mall
|
||||
linux nginx golang redis mysql
|
||||
zsh tmux docker git vim
|
||||
`}}
|
||||
|
@ -2,7 +2,7 @@ package wuhan
|
||||
|
||||
import (
|
||||
"github.com/shylinux/icebergs"
|
||||
"github.com/shylinux/icebergs/base/cli"
|
||||
"github.com/shylinux/icebergs/core/team"
|
||||
"github.com/shylinux/toolkits"
|
||||
)
|
||||
|
||||
@ -15,10 +15,36 @@ var Index = &ice.Context{Name: "wuhan", Help: "武汉加油",
|
||||
ice.ICE_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {}},
|
||||
ice.ICE_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {}},
|
||||
|
||||
"wuhan": {Name: "wuhan", Help: "武汉", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
m.Echo("hello world")
|
||||
"wuhan": {Name: "wuhan", Help: "武汉", Meta: kit.Dict(
|
||||
"display", "china",
|
||||
), Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
data := kit.UnMarshal(m.Cmdx(ice.WEB_SPIDE, "shy", "raw", "GET", "https://view.inews.qq.com/g2/getOnsInfo?name=wuwei_ww_area_counts"))
|
||||
m.Option("title", kit.Format("疫情分布\n%s", m.Time()))
|
||||
|
||||
suspect := map[string]int{}
|
||||
confirm := map[string]int{}
|
||||
dead := map[string]int{}
|
||||
deal := map[string]int{}
|
||||
|
||||
kit.Fetch(kit.UnMarshal(kit.Value(data, "data").(string)), func(index int, value map[string]interface{}) {
|
||||
area := kit.Select(kit.Format(value["country"]), kit.Format(value["area"]))
|
||||
suspect[area] += kit.Int(value["suspect"])
|
||||
confirm[area] += kit.Int(value["confirm"])
|
||||
dead[area] += kit.Int(value["dead"])
|
||||
deal[area] += kit.Int(value["deal"])
|
||||
})
|
||||
|
||||
for k, v := range suspect {
|
||||
m.Push("name", k)
|
||||
m.Push("suspect", v)
|
||||
m.Push("confirm", confirm[k])
|
||||
m.Push("dead", dead[k])
|
||||
m.Push("deal", deal[k])
|
||||
m.Push("value", confirm[k])
|
||||
}
|
||||
m.Sort("confirm", "int_r")
|
||||
}},
|
||||
},
|
||||
}
|
||||
|
||||
func init() { cli.Index.Register(Index, nil) }
|
||||
func init() { team.Index.Register(Index, nil) }
|
||||
|
Loading…
x
Reference in New Issue
Block a user