1
0
mirror of https://github.com/FloatTech/zbpdata.git synced 2026-02-15 19:59:35 +09:00

Compare commits

...

6 Commits

Author SHA1 Message Date
莫思潋
5941ec6108 增加塔罗牌阵数据 (#21)
* 上传tarot.json

* 添加塔罗牌阵
2022-06-19 00:01:07 +08:00
源文雨
5ce4b48c12 Merge branch 'main' of https://github.com/FloatTech/zbpdata into main 2022-06-04 17:58:53 +08:00
源文雨
1241829ec1 change reg host 2022-06-04 17:58:13 +08:00
源文雨
66289a0ad9 Add files via upload 2022-06-01 19:28:36 +08:00
himawari
291200d5d4 添加文静示例音频 (#20)
*  添加文静示例音频
2022-05-10 01:04:11 +08:00
源文雨
f2fa48b3d7 fix: push 2022-05-04 20:26:05 +08:00
4 changed files with 69 additions and 22 deletions

BIN
Fortune/ASoul.zip Normal file

Binary file not shown.

BIN
MockingBird/wj.wav Normal file

Binary file not shown.

51
Tarot/formation.json Normal file
View File

@@ -0,0 +1,51 @@
{
"圣三角": {
"cards_num": 3,
"is_cut": false,
"represent": [
["现状", "愿望", "行动"]
]
},
"时间之流": {
"cards_num": 3,
"is_cut": true,
"represent": [
["过去", "现在", "未来", "问卜者的主观想法"]
]
},
"四要素": {
"cards_num": 4,
"is_cut": false,
"represent": [
["火,象征行动,行动上的建议", "气,象征言语,言语上的对策", "水,象征感情,感情上的态度", "土,象征物质,物质上的准备"]
]
},
"五牌阵": {
"cards_num": 5,
"is_cut": true,
"represent": [
["现在或主要问题", "过去的影响", "未来", "主要原因", "行动可能带来的结果"]
]
},
"吉普赛十字": {
"cards_num": 5,
"is_cut": false,
"represent": [
["对方的想法", "你的想法", "相处中存在的问题", "二人目前的环境", "关系发展的结果"]
]
},
"马蹄": {
"cards_num": 6,
"is_cut": true,
"represent": [
["现状", "可预知的情况", "不可预知的情况", "即将发生的", "结果", "问卜者的主观想法"]
]
},
"六芒星": {
"cards_num": 7,
"is_cut": true,
"represent": [
["过去", "现在", "未来", "对策", "环境", "态度", "预测结果"]
]
}
}

40
main.go
View File

@@ -10,11 +10,9 @@ import (
"io/fs"
"os"
"strings"
"sync"
"unicode"
"unsafe"
"github.com/FloatTech/zbputils/process"
"github.com/fumiama/go-registry"
"github.com/wdvxdr1123/ZeroBot/utils/helper"
)
@@ -41,31 +39,29 @@ func main() {
*(*unsafe.Pointer)(unsafe.Pointer(&md5s[i])) = unsafe.Pointer(&buf)
*(*uintptr)(unsafe.Add(unsafe.Pointer(&md5s[i]), unsafe.Sizeof(uintptr(0)))) = uintptr(16)
}
r := registry.NewRegedit("reilia.westeurope.cloudapp.azure.com:32664", "fumiama", os.Getenv("REILIA_SPS"))
r := registry.NewRegedit("reilia.fumiama.top:32664", "fumiama", os.Getenv("REILIA_SPS"))
err := r.Connect()
if err != nil {
panic(err)
}
defer r.Close()
var wg sync.WaitGroup
wg.Add(len(files))
for i, fn := range files {
go func(i int, fn string) {
defer wg.Done()
for c := 0; c < 5; c++ {
err = r.Set("data/"+fn, md5s[i])
fmt.Println("set", "data/"+fn, "=", hex.EncodeToString(helper.StringToBytes(md5s[i])))
if err == nil {
break
}
if c >= 4 {
panic("ERROR:" + err.Error() + "max retry times exceeded")
} else {
fmt.Println("ERROR:", err, ", retry times:", c)
}
process.SleepAbout1sTo2s()
for c := 0; c < 5; c++ {
err = r.Set("data/"+fn, md5s[i])
fmt.Println("set", "data/"+fn, "=", hex.EncodeToString(helper.StringToBytes(md5s[i])))
if err == nil {
break
}
}(i, fn)
if c >= 4 {
panic("ERROR:" + err.Error() + "max retry times exceeded")
} else {
fmt.Println("ERROR:", err, ", retry times:", c)
}
_ = r.Close()
err = r.Connect()
if err != nil {
panic(err)
}
}
}
wg.Wait()
_ = r.Close()
}