Skip to content

Commit d2712a4

Browse files
committed
Merge branch 'master' into feature-rsshub-20250914
2 parents d8f5ee8 + fef48e4 commit d2712a4

File tree

28 files changed

+449
-949
lines changed

28 files changed

+449
-949
lines changed

.github/workflows/gomod2nix.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ jobs:
1818
- name: Set up Go
1919
uses: actions/setup-go@master
2020
with:
21-
go-version: "1.20"
21+
go-version: "1.25"
2222

2323
- name: Check out code into the Go module directory
2424
uses: actions/checkout@master
25+
with:
26+
fetch-depth: 0
2527

2628
- name: gomod2nix update
2729
run: |

.github/workflows/nightly-docker.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/nightly.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ env:
66
BINARY_PREFIX: "zbp_"
77
BINARY_SUFFIX: ""
88
PR_PROMPT: "::warning:: Build artifact will not be uploaded due to the workflow is trigged by pull request."
9-
LD_FLAGS: "-w -s"
9+
LD_FLAGS: "-w -s -checklinkname=0"
1010

1111
jobs:
1212
build:
@@ -27,10 +27,12 @@ jobs:
2727
fail-fast: true
2828
steps:
2929
- uses: actions/checkout@master
30+
with:
31+
fetch-depth: 0
3032
- name: Setup Go environment
3133
uses: actions/setup-go@master
3234
with:
33-
go-version: '1.20'
35+
go-version: '1.25'
3436
- name: Cache downloaded module
3537
uses: actions/cache@master
3638
continue-on-error: true
@@ -45,6 +47,7 @@ jobs:
4547
GOARCH: ${{ matrix.goarch }}
4648
IS_PR: ${{ !!github.head_ref }}
4749
run: |
50+
GOOS= GOARCH= go generate ./...
4851
if [ $GOOS = "windows" ]; then export BINARY_SUFFIX="$BINARY_SUFFIX.exe"; fi
4952
if $IS_PR ; then echo $PR_PROMPT; fi
5053
export BINARY_NAME="$BINARY_PREFIX$GOOS_$GOARCH$BINARY_SUFFIX"

.github/workflows/pull.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,18 @@ jobs:
2626
- name: Set up Go
2727
uses: actions/setup-go@master
2828
with:
29-
go-version: '1.20'
29+
go-version: '1.24'
3030

3131
- name: Check out code into the Go module directory
3232
uses: actions/checkout@v4
3333
with:
3434
ref: ${{ github.event.pull_request.head.sha }}
35+
fetch-depth: 0
3536

3637
- name: Tidy Modules
37-
run: go mod tidy
38+
run: |
39+
go mod tidy
40+
go generate main.go
3841
3942
- name: golangci-lint
4043
uses: golangci/golangci-lint-action@master

.github/workflows/push.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@ jobs:
88
- name: Set up Go
99
uses: actions/setup-go@master
1010
with:
11-
go-version: '1.20'
11+
go-version: '1.24'
1212

1313
- name: Check out code into the Go module directory
1414
uses: actions/checkout@master
15+
with:
16+
fetch-depth: 0
1517

1618
- name: Tidy Modules
17-
run: go mod tidy
19+
run: |
20+
go mod tidy
21+
go generate main.go
1822
1923
- name: Run Lint
2024
uses: golangci/golangci-lint-action@master

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Go
1717
uses: actions/setup-go@master
1818
with:
19-
go-version: '1.20'
19+
go-version: '1.25'
2020

2121
- name: Run GoReleaser
2222
uses: goreleaser/goreleaser-action@master

.golangci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@ run:
5656
deadline: 5m
5757
issues-exit-code: 1
5858
tests: false
59-
go: '1.20'
59+
go: '1.24'
6060

6161
# output configuration options
6262
output:
6363
formats:
6464
- format: "colored-line-number"
6565
print-issued-lines: true
6666
print-linter-name: true
67-
uniq-by-line: true
6867

6968
issues:
7069
# Fix found issues (if it's supported by the linter)
7170
fix: true
7271
exclude-use-default: false
72+
uniq-by-line: true
7373
exclude:
7474
- "Error return value of .((os.)?std(out|err)..*|.*Close|.*Seek|.*Flush|os.Remove(All)?|.*print(f|ln)?|os.(Un)?Setenv). is not check"
7575
- 'identifier ".*" contain non-ASCII character: U\+.*'

.goreleaser.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ env:
44
before:
55
hooks:
66
- go mod tidy
7+
- go generate ./...
78
- go install github.com/tc-hib/go-winres@latest
89
- go-winres make
910
builds:
@@ -25,7 +26,7 @@ builds:
2526
flags:
2627
- -trimpath
2728
ldflags:
28-
- -s -w
29+
- -s -w -checklinkname=0
2930
- id: win
3031
env:
3132
- CGO_ENABLED=0
@@ -38,7 +39,7 @@ builds:
3839
flags:
3940
- -trimpath
4041
ldflags:
41-
- -s -w
42+
- -s -w -checklinkname=0
4243

4344
checksum:
4445
name_template: "zbp_checksums.txt"

README.md

Lines changed: 15 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,50 +1473,6 @@ print("run[CQ:image,file="+j["img"]+"]")
14731473

14741474
- [x] 每日特惠
14751475
</details>
1476-
<details>
1477-
<summary>百度文心AI</summary>
1478-
1479-
`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/wenxinAI"`
1480-
1481-
基于百度文心API的一些功能
1482-
1483-
key申请链接:https://wenxin.baidu.com/moduleApi/key
1484-
1485-
- [x][自己/本群/QQ号/群+群号]设置文心key [API Key] [Secret Key]
1486-
1487-
- [x][自己/本群/QQ号/群+群号]设置画图key [API Key] [Secret Key]
1488-
1489-
例:“为10086设置画图key 123 456”;“为群10010设置画图key 789 101”
1490-
1491-
文心key和画图key的API key 可以是相同的,只是文心key日限为200,画图日限为50,以此作区别。
1492-
1493-
- [x] 文心作文 (x字的)[作文题目]
1494-
1495-
- [x] 文心提案 (x字的)[文案标题]
1496-
1497-
- [x] 文心摘要 (x字的)[文章内容]
1498-
1499-
- [x] 文心小说 (x字的)[小说上文]
1500-
1501-
- [x] 文心对联 [上联]
1502-
1503-
- [x] 文心问答 [问题]
1504-
1505-
- [x] 文心补全 [带“_”的填空题]
1506-
1507-
- [x] 文心自定义 [prompt]
1508-
1509-
- [x] [bot名称]画几张[图片描述][图片类型][图片尺寸]
1510-
1511-
指令示例:
1512-
1513-
- 文心作文 我的椛椛机器人
1514-
1515-
- 文心作文 300字的我的椛椛机器人
1516-
1517-
- 椛椛帮我画几张金凤凰,背景绚烂,高饱和,古风,仙境,高清,4K,古风的油画方图
1518-
1519-
</details>
15201476
<details>
15211477
<summary>抽老婆</summary>
15221478

@@ -1560,27 +1516,27 @@ print("run[CQ:image,file="+j["img"]+"]")
15601516

15611517
</details>
15621518
<details>
1563-
<summary>一些游戏王插件</summary>
1519+
<summary>游戏王白鸽API卡查</summary>
1520+
1521+
`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/ygocdb"`
15641522

1565-
`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/ygo"`
1566-
1567-
##### 白鸽API卡查
1568-
1569-
###### `"github.com/FloatTech/ZeroBot-Plugin/plugin/ygo/ygocdb.go"`
15701523
- [x] /ydp [xxx]
15711524
- [x] /yds [xxx]
15721525
- [x] /ydb [xxx]
15731526
- 注:[xxx]为搜索内容;p:返回一张图片;s:返回一张效果描述;b:高级搜索
1574-
1575-
##### 集换社卡价查询
15761527

1577-
###### `"github.com/FloatTech/ZeroBot-Plugin/plugin/ygo/ygotrade.go"`
1528+
</details>
1529+
<details>
1530+
<summary>游戏王集换社卡价查询</summary>
1531+
1532+
`import _ "github.com/FloatTech/ZeroBot-Plugin/plugin/ygotrade"`
1533+
15781534
- [x] 查卡价 [卡名]
15791535
- [x] 查卡价 [卡名] -r [稀有度 稀有度 ...]
15801536
- [x] 查卡店 [卡名]
15811537
- [x] 查卡店 [卡名] -r [稀有度]
15821538
- 注:卡店只支持单个稀有度查询
1583-
1539+
15841540
</details>
15851541
<details>
15861542
<summary>月幕galgame图</summary>
@@ -1736,15 +1692,15 @@ go mod tidy
17361692

17371693
```bash
17381694
# 本机平台
1739-
go build -ldflags "-s -w" -o zerobot -trimpath
1695+
go build -ldflags "-s -w -checklinkname=0" -o zerobot -trimpath
17401696
# x64 Linux 平台 如各种云服务器
1741-
GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o zerobot -trimpath
1697+
GOOS=linux GOARCH=amd64 go build -ldflags "-s -w -checklinkname=0" -o zerobot -trimpath
17421698
# x64 Windows 平台 如大多数家用电脑
1743-
GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o zerobot.exe -trimpath
1699+
GOOS=windows GOARCH=amd64 go build -ldflags "-s -w -checklinkname=0" -o zerobot.exe -trimpath
17441700
# armv6 Linux 平台 如树莓派 zero W
1745-
GOOS=linux GOARCH=arm GOARM=6 CGO_ENABLED=0 go build -ldflags "-s -w" -o zerobot -trimpath
1701+
GOOS=linux GOARCH=arm GOARM=6 CGO_ENABLED=0 go build -ldflags "-s -w -checklinkname=0" -o zerobot -trimpath
17461702
# (由于引入了github.com/fumiama/sqlite3,本项不再可用)mips Linux 平台 如 路由器 wndr4300
1747-
GOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=0 go build -ldflags "-s -w" -o zerobot -trimpath
1703+
GOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=0 go build -ldflags "-s -w -checklinkname=0" -o zerobot -trimpath
17481704
```
17491705

17501706
5. 运行 OneBot 框架,并同时运行本插件

0 commit comments

Comments
 (0)