From 1ad9f934c7616d3c7306d09e5c6592840a9f78e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=B9=E6=B0=B8=E8=B5=AB?= <1259085392@qq.com>
Date: Mon, 17 Mar 2025 09:26:21 +0900
Subject: [PATCH 01/16] =?UTF-8?q?=E6=A3=80=E6=B5=8B=E4=BB=93=E5=BA=93?=
=?UTF-8?q?=E5=8F=AF=E8=BE=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/validate_json.yml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/.github/workflows/validate_json.yml b/.github/workflows/validate_json.yml
index 4c7db6bb..da4363fa 100644
--- a/.github/workflows/validate_json.yml
+++ b/.github/workflows/validate_json.yml
@@ -20,3 +20,16 @@ jobs:
run: |
sudo apt-get install jq
jq . plugin.json
+
+ - name: Check repository URLs
+ run: |
+ # 提取 plugin.json 中的 repo 字段并检查可访问性
+ repos=$(jq -r '.. | objects | .repo? // empty' plugin.json)
+ for repo in $repos; do
+ if curl --output /dev/null --silent --head --fail "$repo"; then
+ echo "Repository $repo is accessible."
+ else
+ echo "Repository $repo is NOT accessible." && exit 1
+ fi
+ done
+
From c3859be81e797c9898317c8ad3a0c098bbf06870 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=B9=E6=B0=B8=E8=B5=AB?= <1259085392@qq.com>
Date: Mon, 17 Mar 2025 09:32:26 +0900
Subject: [PATCH 02/16] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6?=
=?UTF-8?q?=E5=90=8D=E9=94=99=E8=AF=AF=EF=BC=8C=E6=94=AF=E6=8C=81=E6=89=8B?=
=?UTF-8?q?=E5=8A=A8=E6=89=A7=E8=A1=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/validate_json.yml | 5 +-
.idea/.gitignore | 8 +++
.idea/AstrBot_Plugins_Collection.iml | 8 +++
.idea/inspectionProfiles/Project_Default.xml | 49 +++++++++++++++++++
.../inspectionProfiles/profiles_settings.xml | 6 +++
.idea/misc.xml | 7 +++
.idea/modules.xml | 8 +++
.idea/vcs.xml | 7 +++
8 files changed, 96 insertions(+), 2 deletions(-)
create mode 100644 .idea/.gitignore
create mode 100644 .idea/AstrBot_Plugins_Collection.iml
create mode 100644 .idea/inspectionProfiles/Project_Default.xml
create mode 100644 .idea/inspectionProfiles/profiles_settings.xml
create mode 100644 .idea/misc.xml
create mode 100644 .idea/modules.xml
create mode 100644 .idea/vcs.xml
diff --git a/.github/workflows/validate_json.yml b/.github/workflows/validate_json.yml
index da4363fa..284c6d78 100644
--- a/.github/workflows/validate_json.yml
+++ b/.github/workflows/validate_json.yml
@@ -3,10 +3,11 @@ name: Validate plugin.json
on:
push:
paths:
- - 'plugin.json'
+ - 'plugins.json'
pull_request:
paths:
- - 'plugin.json'
+ - 'plugins.json'
+ workflow_dispatch: # 支持手动触发
jobs:
validate-json:
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 00000000..35410cac
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
+# 基于编辑器的 HTTP 客户端请求
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/AstrBot_Plugins_Collection.iml b/.idea/AstrBot_Plugins_Collection.iml
new file mode 100644
index 00000000..8388dbc8
--- /dev/null
+++ b/.idea/AstrBot_Plugins_Collection.iml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 00000000..45b7d5cb
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 00000000..105ce2da
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 00000000..812ab5a6
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 00000000..0c0ebda5
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 00000000..83067447
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
From ec4d5a218e9947638e3d09247a04ba49aad326fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=B9=E6=B0=B8=E8=B5=AB?= <1259085392@qq.com>
Date: Mon, 17 Mar 2025 09:41:35 +0900
Subject: [PATCH 03/16] =?UTF-8?q?=E6=B7=BB=E5=8A=A0gitignore?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 1 +
.idea/.gitignore | 8 ---
.idea/AstrBot_Plugins_Collection.iml | 8 ---
.idea/inspectionProfiles/Project_Default.xml | 49 -------------------
.../inspectionProfiles/profiles_settings.xml | 6 ---
.idea/misc.xml | 7 ---
.idea/modules.xml | 8 ---
.idea/vcs.xml | 7 ---
8 files changed, 1 insertion(+), 93 deletions(-)
create mode 100644 .gitignore
delete mode 100644 .idea/.gitignore
delete mode 100644 .idea/AstrBot_Plugins_Collection.iml
delete mode 100644 .idea/inspectionProfiles/Project_Default.xml
delete mode 100644 .idea/inspectionProfiles/profiles_settings.xml
delete mode 100644 .idea/misc.xml
delete mode 100644 .idea/modules.xml
delete mode 100644 .idea/vcs.xml
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..1c2d52b6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.idea/*
diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 35410cac..00000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# 默认忽略的文件
-/shelf/
-/workspace.xml
-# 基于编辑器的 HTTP 客户端请求
-/httpRequests/
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
diff --git a/.idea/AstrBot_Plugins_Collection.iml b/.idea/AstrBot_Plugins_Collection.iml
deleted file mode 100644
index 8388dbc8..00000000
--- a/.idea/AstrBot_Plugins_Collection.iml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 45b7d5cb..00000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
deleted file mode 100644
index 105ce2da..00000000
--- a/.idea/inspectionProfiles/profiles_settings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 812ab5a6..00000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 0c0ebda5..00000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 83067447..00000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
From da0c9a83ae91c196d5fd8b72a38d89b9727b5d67 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=B9=E6=B0=B8=E8=B5=AB?= <1259085392@qq.com>
Date: Mon, 17 Mar 2025 09:43:35 +0900
Subject: [PATCH 04/16] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6?=
=?UTF-8?q?=E5=90=8D=E9=94=99=E8=AF=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/validate_json.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/validate_json.yml b/.github/workflows/validate_json.yml
index 284c6d78..6ea61446 100644
--- a/.github/workflows/validate_json.yml
+++ b/.github/workflows/validate_json.yml
@@ -17,10 +17,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- - name: Validate plugin.json format
+ - name: Validate plugins.json format
run: |
sudo apt-get install jq
- jq . plugin.json
+ jq . plugins.json
- name: Check repository URLs
run: |
From 490a78244c500a79ac65716e8c5dfaab3df8a191 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=B9=E6=B0=B8=E8=B5=AB?= <1259085392@qq.com>
Date: Mon, 17 Mar 2025 09:46:25 +0900
Subject: [PATCH 05/16] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20plugins.json=20?=
=?UTF-8?q?=E6=A0=BC=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
plugins.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins.json b/plugins.json
index e4f7a12e..60da1cff 100644
--- a/plugins.json
+++ b/plugins.json
@@ -659,5 +659,5 @@
"author": "达莉娅",
"tags": ["娱乐", "游戏"],
"repo": "https://github.com/zhenli12138/astrbot_plugin_horse_race"
- },
+ }
}
From 4cd554f306dfe8ecadca148543245fcc9656c3ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=B9=E6=B0=B8=E8=B5=AB?= <1259085392@qq.com>
Date: Mon, 17 Mar 2025 09:52:02 +0900
Subject: [PATCH 06/16] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D?=
=?UTF-8?q?=E9=AA=8C=E8=AF=81=E6=96=87=E4=BB=B6=E6=A0=BC=E5=BC=8F=E5=8D=A1?=
=?UTF-8?q?=E4=BD=8F=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/validate_json.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/validate_json.yml b/.github/workflows/validate_json.yml
index 6ea61446..fb28f70f 100644
--- a/.github/workflows/validate_json.yml
+++ b/.github/workflows/validate_json.yml
@@ -20,7 +20,7 @@ jobs:
- name: Validate plugins.json format
run: |
sudo apt-get install jq
- jq . plugins.json
+ jq . plugins.json > /dev/null
- name: Check repository URLs
run: |
From 86aab42688bcd98e9c344c4f6fc710b1d23b7884 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=B9=E6=B0=B8=E8=B5=AB?= <1259085392@qq.com>
Date: Mon, 17 Mar 2025 09:53:09 +0900
Subject: [PATCH 07/16] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6?=
=?UTF-8?q?=E5=90=8D=E9=94=99=E8=AF=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/validate_json.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/validate_json.yml b/.github/workflows/validate_json.yml
index fb28f70f..665caff8 100644
--- a/.github/workflows/validate_json.yml
+++ b/.github/workflows/validate_json.yml
@@ -24,8 +24,8 @@ jobs:
- name: Check repository URLs
run: |
- # 提取 plugin.json 中的 repo 字段并检查可访问性
- repos=$(jq -r '.. | objects | .repo? // empty' plugin.json)
+ # 提取 plugins.json 中的 repo 字段并检查可访问性
+ repos=$(jq -r '.. | objects | .repo? // empty' plugins.json)
for repo in $repos; do
if curl --output /dev/null --silent --head --fail "$repo"; then
echo "Repository $repo is accessible."
From 91c515f25c88ab7cabf65c2acc73477aef5a0af8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=B9=E6=B0=B8=E8=B5=AB?= <1259085392@qq.com>
Date: Mon, 17 Mar 2025 09:56:36 +0900
Subject: [PATCH 08/16] =?UTF-8?q?=E8=BE=93=E5=87=BA=E6=89=80=E6=9C=89?=
=?UTF-8?q?=E4=B8=8D=E5=8F=AF=E8=AE=BF=E9=97=AE=E4=BB=93=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/validate_json.yml | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/validate_json.yml b/.github/workflows/validate_json.yml
index 665caff8..2af457f3 100644
--- a/.github/workflows/validate_json.yml
+++ b/.github/workflows/validate_json.yml
@@ -26,11 +26,25 @@ jobs:
run: |
# 提取 plugins.json 中的 repo 字段并检查可访问性
repos=$(jq -r '.. | objects | .repo? // empty' plugins.json)
+ inaccessible_urls=() # 初始化一个数组用于记录不可访问的 URL
+
for repo in $repos; do
if curl --output /dev/null --silent --head --fail "$repo"; then
echo "Repository $repo is accessible."
else
- echo "Repository $repo is NOT accessible." && exit 1
+ echo "Repository $repo is NOT accessible."
+ inaccessible_urls+=("$repo") # 将不可访问的 URL 添加到数组
fi
done
+
+ # 检查是否有不可访问的 URL
+ if [ ${#inaccessible_urls[@]} -ne 0 ]; then
+ echo "The following repositories are NOT accessible:"
+ for url in "${inaccessible_urls[@]}"; do
+ echo "$url" # 输出每个不可访问的 URL
+ done
+ exit 1 # 结束运行并标记失败状态
+ else
+ echo "All repositories are accessible."
+ fi
From 7b94897b5ebf18b1146865bea3b5247d1ada3c09 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=B9=E6=B0=B8=E8=B5=AB?= <1259085392@qq.com>
Date: Mon, 17 Mar 2025 10:09:44 +0900
Subject: [PATCH 09/16] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=94=A8=E4=BA=8E?=
=?UTF-8?q?=E6=B8=85=E7=90=86=E4=B8=8D=E5=8F=AF=E8=AE=BF=E9=97=AE=E6=8F=92?=
=?UTF-8?q?=E4=BB=B6=E7=9A=84action?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../workflows/clean_inaccessible_plugins.yml | 76 +++++++++++++++++++
1 file changed, 76 insertions(+)
create mode 100644 .github/workflows/clean_inaccessible_plugins.yml
diff --git a/.github/workflows/clean_inaccessible_plugins.yml b/.github/workflows/clean_inaccessible_plugins.yml
new file mode 100644
index 00000000..8b7e105a
--- /dev/null
+++ b/.github/workflows/clean_inaccessible_plugins.yml
@@ -0,0 +1,76 @@
+name: Clean Unreachable Plugins
+
+on:
+ workflow_dispatch:
+ push:
+ paths:
+ - 'plugins.json'
+
+jobs:
+ clean-unreachable-plugins:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Set up jq and curl
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y jq curl
+
+ - name: Clean unreachable plugins
+ run: |
+ echo "Cleaning unreachable plugins from plugins.json..."
+
+ # 初始化临时文件
+ temp_file=$(mktemp)
+
+ # 初始化无效插件列表
+ invalid_plugins=()
+
+ # 创建临时文件,用于保存有效插件
+ echo "{}" > $temp_file
+
+ # 遍历 plugins.json 的每个键
+ for plugin in $(jq -r 'keys[]' plugins.json); do
+ # 获取 repo 地址
+ repo=$(jq -r ".[\"$plugin\"].repo" plugins.json)
+
+ # 检查 repo 地址可访问性
+ if curl --head --silent --fail "$repo" > /dev/null; then
+ echo "Plugin $plugin repository is accessible."
+ # 如果 repo 可访问,将插件数据追加到临时文件
+ jq ".[\"$plugin\"] = .[\"$plugin\"]" $temp_file > temp.json && mv temp.json $temp_file
+ else
+ echo "Plugin $plugin repository is NOT accessible."
+ # 如果 repo 不可访问,将插件名添加到无效插件列表
+ invalid_plugins+=("$plugin")
+ fi
+ done
+
+ # 输出所有无效插件名
+ if [ ${#invalid_plugins[@]} -ne 0 ]; then
+ echo "Removed the following unreachable plugins:"
+ for plugin in "${invalid_plugins[@]}"; do
+ echo "$plugin"
+ done
+ else
+ echo "No unreachable plugins found."
+ fi
+
+ # 用清理后的内容覆盖写回 plugins.json
+ mv $temp_file plugins.json
+
+ - name: Output the cleaned plugins.json
+ run: |
+ echo "Cleaned plugins.json:"
+ cat plugins.json
+
+ - name: Commit and push changes
+ if: github.event_name == 'push'
+ run: |
+ git config --local user.name "github-actions[bot]"
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
+ git add plugins.json
+ git commit -m "Clean unreachable plugins from plugins.json"
+ git push origin HEAD
\ No newline at end of file
From 65f404b84a0f5694763332f18b93e2ff2993439f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=B9=E6=B0=B8=E8=B5=AB?= <1259085392@qq.com>
Date: Mon, 17 Mar 2025 10:10:52 +0900
Subject: [PATCH 10/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B8=85=E7=90=86?=
=?UTF-8?q?=E6=97=A0=E6=95=88=E6=8F=92=E4=BB=B6action=E4=B8=BA=E5=8F=AA?=
=?UTF-8?q?=E6=94=AF=E6=8C=81=E6=89=8B=E5=8A=A8=E6=89=A7=E8=A1=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/clean_inaccessible_plugins.yml | 3 ---
1 file changed, 3 deletions(-)
diff --git a/.github/workflows/clean_inaccessible_plugins.yml b/.github/workflows/clean_inaccessible_plugins.yml
index 8b7e105a..52cd10a5 100644
--- a/.github/workflows/clean_inaccessible_plugins.yml
+++ b/.github/workflows/clean_inaccessible_plugins.yml
@@ -2,9 +2,6 @@ name: Clean Unreachable Plugins
on:
workflow_dispatch:
- push:
- paths:
- - 'plugins.json'
jobs:
clean-unreachable-plugins:
From 19234069c7c308930a01f223156c0b91a85a9aa0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=B9=E6=B0=B8=E8=B5=AB?= <1259085392@qq.com>
Date: Mon, 17 Mar 2025 10:16:57 +0900
Subject: [PATCH 11/16] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=BA=E4=BF=9D?=
=?UTF-8?q?=E6=8C=81=E5=8E=9F=E5=A7=8B=E6=96=87=E4=BB=B6=E6=A0=BC=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../workflows/clean_inaccessible_plugins.yml | 27 ++++++-------------
1 file changed, 8 insertions(+), 19 deletions(-)
diff --git a/.github/workflows/clean_inaccessible_plugins.yml b/.github/workflows/clean_inaccessible_plugins.yml
index 52cd10a5..43999936 100644
--- a/.github/workflows/clean_inaccessible_plugins.yml
+++ b/.github/workflows/clean_inaccessible_plugins.yml
@@ -7,7 +7,7 @@ jobs:
clean-unreachable-plugins:
runs-on: ubuntu-latest
steps:
- - name: Checkout repository
+ - name: Checkout the repository
uses: actions/checkout@v2
- name: Set up jq and curl
@@ -19,33 +19,26 @@ jobs:
run: |
echo "Cleaning unreachable plugins from plugins.json..."
- # 初始化临时文件
- temp_file=$(mktemp)
-
# 初始化无效插件列表
invalid_plugins=()
- # 创建临时文件,用于保存有效插件
- echo "{}" > $temp_file
-
# 遍历 plugins.json 的每个键
- for plugin in $(jq -r 'keys[]' plugins.json); do
+ jq -r 'keys[]' plugins.json | while read -r plugin; do
# 获取 repo 地址
repo=$(jq -r ".[\"$plugin\"].repo" plugins.json)
- # 检查 repo 地址可访问性
- if curl --head --silent --fail "$repo" > /dev/null; then
+ # 检查 repo 地址的可访问性
+ if curl --head --silent --fail --max-time 5 "$repo" > /dev/null; then
echo "Plugin $plugin repository is accessible."
- # 如果 repo 可访问,将插件数据追加到临时文件
- jq ".[\"$plugin\"] = .[\"$plugin\"]" $temp_file > temp.json && mv temp.json $temp_file
else
echo "Plugin $plugin repository is NOT accessible."
- # 如果 repo 不可访问,将插件名添加到无效插件列表
- invalid_plugins+=("$plugin")
+ invalid_plugins+=("$plugin") # 将无效插件名添加到列表
+ # 通过 jq 删除插件
+ jq "del(.\"$plugin\")" plugins.json > temp.json && mv temp.json plugins.json
fi
done
- # 输出所有无效插件名
+ # 打印输出所有无效插件名
if [ ${#invalid_plugins[@]} -ne 0 ]; then
echo "Removed the following unreachable plugins:"
for plugin in "${invalid_plugins[@]}"; do
@@ -55,16 +48,12 @@ jobs:
echo "No unreachable plugins found."
fi
- # 用清理后的内容覆盖写回 plugins.json
- mv $temp_file plugins.json
-
- name: Output the cleaned plugins.json
run: |
echo "Cleaned plugins.json:"
cat plugins.json
- name: Commit and push changes
- if: github.event_name == 'push'
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
From 93ce9f2db62d9a7c60f38f811fcb2c0bd9dc6918 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Mon, 17 Mar 2025 01:18:35 +0000
Subject: [PATCH 12/16] Clean unreachable plugins from plugins.json
---
plugins.json | 103 ++++++++++++++++++++++++++++++++++++---------------
1 file changed, 74 insertions(+), 29 deletions(-)
diff --git a/plugins.json b/plugins.json
index 60da1cff..0a546abf 100644
--- a/plugins.json
+++ b/plugins.json
@@ -3,19 +3,29 @@
"desc": "使bot在用户长时间未发送消息时主动与用户对话的插件",
"author": "Jason",
"repo": "https://github.com/advent259141/astrbot_plugin_InitiativeDialogue",
- "tags": ["主动对话"]
+ "tags": [
+ "主动对话"
+ ]
},
"astrbot_plugin_sensoji": {
"desc": "这是一个模拟日本浅草寺抽签功能的插件。用户可以通过发送 /抽签 命令随机抽取一个签文,获取运势提示。签文包含吉凶结果(如“大吉”、“凶”等)以及对应的运势描述。",
"author": "Shouugou",
"repo": "https://github.com/Shouugou/astrbot_plugin_sensoji",
- "tags": ["抽签", "运势", "浅草寺", "趣味"]
+ "tags": [
+ "抽签",
+ "运势",
+ "浅草寺",
+ "趣味"
+ ]
},
"astrbot_plugin_daily_news": {
"desc": "[仅 aiocqhttp] anka - 每日60s新闻推送插件, 请先设置推送目标和时间, 详情见github页面!",
"author": "anka",
"repo": "https://github.com/anka-afk/astrbot_plugin_daily_news",
- "tags": ["功能", "推送"]
+ "tags": [
+ "功能",
+ "推送"
+ ]
},
"astrbot_plugin_gemini_exp": {
"desc": "让你在 AstrBot 调用 Gemini2.0-flash-exp 来生成图片或者 P 图。Gemini2.0-flash-exp为原生多模态模型,其既是语言模型,也是生图模型,因此能够对图像使用简单的自然语言命令进行处理。",
@@ -23,21 +33,22 @@
"repo": "https://github.com/Elen123bot/astrbot_plugin_gemini_exp",
"social_link": "https://x.com/Alens454635"
},
- "astrbot_plugin_nopoke": {
- "desc": "[仅 aiocqhttp]不同次数戳一戳的小彩蛋",
- "author": "Aligajane",
- "repo": "https://github.com/Aligajane/astrbot_plugin_nopoke"
- },
"astrbot_plugin_qwq_filter": {
"desc": "QwQ 模型思考内容过滤工具",
"author": "beat4ocean",
- "tags": ["qwq", "思考过滤"],
+ "tags": [
+ "qwq",
+ "思考过滤"
+ ],
"repo": "https://github.com/beat4ocean/astrbot_plugin_qwq_filter"
},
"astrbot_plugin_chatsummary": {
"desc": "[仅 aiocqhttp] 一个通过拉取历史聊天记录,调用 LLM 大模型接口实现消息总结功能。",
"author": "laopanmemz",
- "tags": ["消息总结", "LLM"],
+ "tags": [
+ "消息总结",
+ "LLM"
+ ],
"social_link": "https://space.bilibili.com/447591776",
"repo": "https://github.com/laopanmemz/astrbot_plugin_chatsummary"
},
@@ -45,7 +56,9 @@
"desc": "解析群内 https://www.bilibili.com/video/BV号/ 的链接并获取视频数据与视频文件,以合并转发方式发送",
"author": "haliludaxuanfeng",
"repo": "https://github.com/haliludaxuanfeng/astrbot_plugin_bv",
- "tags": ["bilibili"]
+ "tags": [
+ "bilibili"
+ ]
},
"astrBot_PGR_Dialogue": {
"desc": "检测到部分战双角色的名称(或别称)时,有概率发送一条语音文本",
@@ -61,7 +74,10 @@
"desc": "摸鱼人日历,支持自定义时间时区,自定义api,支持立即发送,工作日定时发送。",
"author": "quirrel-zh/DuBwTf",
"repo": "https://github.com/DuBwTf/astrbot_plugin_moyurenpro",
- "tags": ["功能", "定时任务"]
+ "tags": [
+ "功能",
+ "定时任务"
+ ]
},
"astrbot_plugin_image_understanding_Janus-Pro": {
"desc": "为本地模型提供的图片理解补充,使用deepseek-ai/Janus-Pro系列模型",
@@ -82,7 +98,10 @@
"desc": "AstrBot Wordle 猜单词游戏,支持指定位数",
"author": "Raven95676",
"repo": "https://github.com/Raven95676/astrbot_plugin_wordle",
- "tags": ["娱乐", "游戏"]
+ "tags": [
+ "娱乐",
+ "游戏"
+ ]
},
"astr_plugin_bilibili_plus": {
"repo": "https://github.com/rikkasaiko/astr_plugin_bilibili_plus",
@@ -92,7 +111,9 @@
"astrbot_plugin_nofap": {
"desc": "一个用于戒 🦌 记录打卡和查看群内戒 🦌 榜的插件",
"author": "aoz",
- "tags": ["功能"],
+ "tags": [
+ "功能"
+ ],
"repo": "https://github.com/Aozaky/astrbot_plugin_nofap"
},
"astrbot_plugin_niuniuplus": {
@@ -104,7 +125,9 @@
"desc": "随机推送正在直播的管人直播间",
"author": "Sasaki",
"repo": "https://github.com/Wave233Lee/astrbot_plugin_random_vtb",
- "tag": ["娱乐"],
+ "tag": [
+ "娱乐"
+ ],
"social_link": "https://space.bilibili.com/11874232"
},
"astrbot_plugin_server_status": {
@@ -131,7 +154,10 @@
"desc": "使大模型更好的主动回复群聊中的消息,带来生动和沉浸的群聊对话体验",
"author": "23q3",
"social_link": "https://space.bilibili.com/396943350",
- "tags": ["伪人", "主动回复"],
+ "tags": [
+ "伪人",
+ "主动回复"
+ ],
"repo": "https://github.com/23q3/astrbot_plugin_SpectreCore"
},
"astrbot_plugin_steamshot": {
@@ -139,38 +165,58 @@
"author": "inori-3333",
"repo": "https://github.com/inori-3333/astrbot_plugin_steamshot",
"social_link": "https://steamcommunity.com/id/inori_333/",
- "tags": ["功能", "游戏", "数据查询", "图片"]
+ "tags": [
+ "功能",
+ "游戏",
+ "数据查询",
+ "图片"
+ ]
},
"astrbot_plugin_GGAC_Messenger": {
"desc": "anka - GGAC 作品更新推送插件 - 自动监控并推送 GGAC 平台精选作品的更新! 附赠一套 GGAC 网站完整 api! 还有随机抽取 GGAC 内容功能, 详情见github页面!",
"author": "anka",
"repo": "https://github.com/anka-afk/astrbot_plugin_ggac",
- "tags": ["功能", "推送"]
+ "tags": [
+ "功能",
+ "推送"
+ ]
},
"astrbot_plugin_github_cards": {
"logo": "https://blog.soulter.top/assets/avatar.webp",
"desc": "根据聊天中 GitHub 相关链接自动发送 GitHub 仓库简介/issue/pr卡片",
"author": "Soulter",
"repo": "https://github.com/Soulter/astrbot_plugin_github_cards",
- "tags": ["功能"]
+ "tags": [
+ "功能"
+ ]
},
"astrbot_plugin_hltv": {
"desc": "这是基于 HLTV 网站数据的 CS 赛事查询插件",
"author": "Jason",
"repo": "https://github.com/advent259141/astrbot_plugin_hltv",
- "tags": ["功能", "游戏", "数据查询"]
+ "tags": [
+ "功能",
+ "游戏",
+ "数据查询"
+ ]
},
"astrbot_plugin_moyuren": {
"desc": "每天定时推送摸鱼人日历",
"author": "quirrel-zh",
"repo": "https://github.com/Quirrel-zh/astrbot_plugin_moyuren",
- "tags": ["功能", "定时任务"]
+ "tags": [
+ "功能",
+ "定时任务"
+ ]
},
"astrbot_sowing_discord": {
"desc": "[仅限 aiocqhttp 适配器] anka - 自动搬史插件, 1.加入喜欢发史的群聊 2.设置搬史来源 3.设置搬史目标 4.开始全自动搬史!",
"author": "anka",
"repo": "https://github.com/anka-afk/astrbot_sowing_discord",
- "tags": ["功能", "搬史"]
+ "tags": [
+ "功能",
+ "搬史"
+ ]
},
"astrbot_plugin_superpoke": {
"desc": "超级戳一戳根据,让戳一戳能够调用其他插件指令",
@@ -191,7 +237,12 @@
"desc": "Astrbot表情包管理器3.0版本已发布! 提供便捷的 WebUI 管理界面(/表情管理 开启管理后台) , 所有 prompt 会根据修改的表情包文件夹目录自动维护,无需手动添加!可以控制每次发送的表情数量和频率(进入设置配置一次发送最大数量与发送概率) 更多信息与功能预览请前往仓库页面, 使用/plugin meme_manager查看所有指令",
"author": "anka",
"repo": "https://github.com/anka-afk/astrbot_plugin_meme_manager",
- "tags": ["功能", "meme", "webui", "图床"]
+ "tags": [
+ "功能",
+ "meme",
+ "webui",
+ "图床"
+ ]
},
"mccloud_command": {
"desc": "用于修改插件命令的工具,支持备份和恢复,仅限管理员使用。/cmd 查看帮助",
@@ -653,11 +704,5 @@
"desc": "硅基流动利用用户的参考音频进行文本转语音的功能,测试中音频文件(测试用的.mp3)可用,内置了一个测试用的三月七(填写api就可用)",
"author": "达莉娅",
"repo": "https://github.com/zhenli12138/astrbot_plugin_moreVITS"
- },
- "astrbot_plugin_horse_race": {
- "desc": "[仅限非官Q] 赛马比赛。快来和群友一起来一场紧张刺激的赛马比赛,用道具搞对手心态,大赚特赚吧",
- "author": "达莉娅",
- "tags": ["娱乐", "游戏"],
- "repo": "https://github.com/zhenli12138/astrbot_plugin_horse_race"
}
}
From 81edcf6378953ab9439688feed7961031921ac6f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=B9=E6=B0=B8=E8=B5=AB?= <1259085392@qq.com>
Date: Mon, 17 Mar 2025 10:29:11 +0900
Subject: [PATCH 13/16] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=90=8D=E7=A7=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
...cessible_plugins.yml => clean-unreachable-plugins.yml} | 0
.github/workflows/validate_json.yml | 8 ++++----
2 files changed, 4 insertions(+), 4 deletions(-)
rename .github/workflows/{clean_inaccessible_plugins.yml => clean-unreachable-plugins.yml} (100%)
diff --git a/.github/workflows/clean_inaccessible_plugins.yml b/.github/workflows/clean-unreachable-plugins.yml
similarity index 100%
rename from .github/workflows/clean_inaccessible_plugins.yml
rename to .github/workflows/clean-unreachable-plugins.yml
diff --git a/.github/workflows/validate_json.yml b/.github/workflows/validate_json.yml
index 2af457f3..ed776ba9 100644
--- a/.github/workflows/validate_json.yml
+++ b/.github/workflows/validate_json.yml
@@ -26,21 +26,21 @@ jobs:
run: |
# 提取 plugins.json 中的 repo 字段并检查可访问性
repos=$(jq -r '.. | objects | .repo? // empty' plugins.json)
- inaccessible_urls=() # 初始化一个数组用于记录不可访问的 URL
+ unreachable_urls=() # 初始化一个数组用于记录不可访问的 URL
for repo in $repos; do
if curl --output /dev/null --silent --head --fail "$repo"; then
echo "Repository $repo is accessible."
else
echo "Repository $repo is NOT accessible."
- inaccessible_urls+=("$repo") # 将不可访问的 URL 添加到数组
+ unreachable_urls+=("$repo") # 将不可访问的 URL 添加到数组
fi
done
# 检查是否有不可访问的 URL
- if [ ${#inaccessible_urls[@]} -ne 0 ]; then
+ if [ ${#unreachable_urls[@]} -ne 0 ]; then
echo "The following repositories are NOT accessible:"
- for url in "${inaccessible_urls[@]}"; do
+ for url in "${unreachable_urls[@]}"; do
echo "$url" # 输出每个不可访问的 URL
done
exit 1 # 结束运行并标记失败状态
From a61394a58c169c672e9ad655e9106ef7e3a5fd39 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=B9=E6=B0=B8=E8=B5=AB?= <1259085392@qq.com>
Date: Mon, 17 Mar 2025 10:38:34 +0900
Subject: [PATCH 14/16] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=92=E4=BB=B6?=
=?UTF-8?q?=E5=90=8D=E9=94=99=E8=AF=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/clean-unreachable-plugins.yml | 13 ++++++++++---
plugins.json | 2 +-
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/clean-unreachable-plugins.yml b/.github/workflows/clean-unreachable-plugins.yml
index 43999936..435a676b 100644
--- a/.github/workflows/clean-unreachable-plugins.yml
+++ b/.github/workflows/clean-unreachable-plugins.yml
@@ -57,6 +57,13 @@ jobs:
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
- git add plugins.json
- git commit -m "Clean unreachable plugins from plugins.json"
- git push origin HEAD
\ No newline at end of file
+
+ # 检查是否有需要提交的更改
+ if [[ $(git status --porcelain) ]]; then
+ echo "Changes detected. Proceeding to commit and push."
+ git add plugins.json
+ git commit -m "Clean unreachable plugins from plugins.json"
+ git push origin HEAD
+ else
+ echo "No changes detected. Skipping commit and push."
+ fi
\ No newline at end of file
diff --git a/plugins.json b/plugins.json
index 0a546abf..36bcdc90 100644
--- a/plugins.json
+++ b/plugins.json
@@ -700,7 +700,7 @@
"desc": "二次元图片签到以及好友买卖,对接牛牛商城,仅支持qq且仅支持非官方bot(其他平台请自行测试)",
"repo": "https://github.com/zgojin/astrbot_plugin_Qsign"
},
- "astrbot_plugin_moreVITS ": {
+ "astrbot_plugin_moreVITS": {
"desc": "硅基流动利用用户的参考音频进行文本转语音的功能,测试中音频文件(测试用的.mp3)可用,内置了一个测试用的三月七(填写api就可用)",
"author": "达莉娅",
"repo": "https://github.com/zhenli12138/astrbot_plugin_moreVITS"
From d6e8abcd82878c65080f96d450eebcf288aadb6b Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Mon, 17 Mar 2025 01:41:30 +0000
Subject: [PATCH 15/16] Clean unreachable plugins from plugins.json
---
plugins.json | 5 -----
1 file changed, 5 deletions(-)
diff --git a/plugins.json b/plugins.json
index 36bcdc90..9ad3eb57 100644
--- a/plugins.json
+++ b/plugins.json
@@ -699,10 +699,5 @@
"author": "长安某",
"desc": "二次元图片签到以及好友买卖,对接牛牛商城,仅支持qq且仅支持非官方bot(其他平台请自行测试)",
"repo": "https://github.com/zgojin/astrbot_plugin_Qsign"
- },
- "astrbot_plugin_moreVITS": {
- "desc": "硅基流动利用用户的参考音频进行文本转语音的功能,测试中音频文件(测试用的.mp3)可用,内置了一个测试用的三月七(填写api就可用)",
- "author": "达莉娅",
- "repo": "https://github.com/zhenli12138/astrbot_plugin_moreVITS"
}
}
From 0a6215a205f181f03f50d12cf61bf00c92ec6155 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=B9=E6=B0=B8=E8=B5=AB?= <1259085392@qq.com>
Date: Mon, 17 Mar 2025 10:44:59 +0900
Subject: [PATCH 16/16] fix readme
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 420104aa..fd35f687 100644
--- a/README.md
+++ b/README.md
@@ -4,5 +4,5 @@ AstrBot Plugin 插件集合站,用于在 AstrBot 仪表盘-插件页中作为
## 提交插件
-> [!NOTE]
+> [NOTE!]
> 请点击链接前往 AstrBot 主仓库提交插件:[🥳 发布插件](https://github.com/Soulter/AstrBot/issues/new?template=PLUGIN_PUBLISH.yml)