1
0
mirror of https://github.com/FloatTech/zbpdata.git synced 2026-02-16 20:27:06 +09:00

Compare commits

...

18 Commits

Author SHA1 Message Date
源文雨
b3d25c45fd 恢复 2022-04-17 21:17:33 +08:00
源文雨
6d4212b19d 增加竞争速度 2022-04-17 20:34:18 +08:00
源文雨
e48e615305 增加竞争速度 2022-04-17 20:33:18 +08:00
源文雨
365b1a915a 增加竞争速度 2022-04-17 20:32:57 +08:00
源文雨
7aa2cbd0f5 feat: 改为并行上传 2022-04-17 20:09:05 +08:00
源文雨
fb80a176f0 feat: 改为并行上传 2022-04-17 16:18:12 +08:00
源文雨
50b189ebad feat: 改为并行上传 2022-04-17 16:10:37 +08:00
源文雨
ab10aa8a6b feat: 改为并行上传 2022-04-17 16:03:41 +08:00
himawari
3b9009e90f 添加停用词 (#16) 2022-04-16 20:03:36 +08:00
Kanri
7d6739a9b7 增加运势 奇异恩典 2022-04-03 14:31:18 +08:00
源文雨
5155c7318a 🙈 edit ignore 2022-03-28 16:12:34 +08:00
himawari
cbbc692baf Merge pull request #15 from guohuiyuan/main
:wrench:添加vup数据库
2022-03-27 22:25:48 +08:00
himawari
6a32c29c42 :wrench:添加vup数据库 2022-03-27 22:24:40 +08:00
himawari
6919d2ccb9 Merge pull request #2 from FloatTech/main
👍 合并
2022-03-27 22:20:44 +08:00
源文雨
9fc3ca233b fix release 2022-03-27 14:00:12 +08:00
源文雨
d6efc79f18 add fonts 2022-03-27 13:27:16 +08:00
himawari
7e1b02a21e Merge pull request #1 from FloatTech/main
2022-03-23 20:24:13 +08:00
Coloured-glaze
c6f5b6ed31 原神抽卡 (#14) 2022-03-20 00:33:27 +08:00
10 changed files with 1921 additions and 7 deletions

View File

@@ -24,5 +24,6 @@ jobs:
run: |
ls
go mod init updater
sed -i '1,3d' main.go
go mod tidy
go run main.go

1
.gitignore vendored
View File

@@ -19,3 +19,4 @@ scale
MockingBird/cache
driftbottle
job
hyaku

BIN
Bilibili/bilibili.db Normal file

Binary file not shown.

BIN
Font/Nisi-Regular.ttf Normal file

Binary file not shown.

Binary file not shown.

BIN
Font/zhongmoti.ttf Normal file

Binary file not shown.

BIN
Fortune/奇异恩典.zip Normal file

Binary file not shown.

BIN
Genshin/Genshin.zip Normal file

Binary file not shown.

1893
WordCount/stopwords.txt Normal file

File diff suppressed because it is too large Load Diff

31
main.go
View File

@@ -1,3 +1,6 @@
//go:build ignore
// +build ignore
package main
import (
@@ -7,9 +10,11 @@ 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,12 +46,26 @@ func main() {
if err != nil {
panic(err)
}
defer r.Close()
var wg sync.WaitGroup
wg.Add(len(files))
for i, fn := range files {
fmt.Println("set", "data/"+fn, "=", hex.EncodeToString(helper.StringToBytes(md5s[i])))
err = r.Set("data/"+fn, md5s[i])
if err != nil {
panic(err)
}
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()
}
}(i, fn)
}
r.Close()
wg.Wait()
}