nonebot-plugin-anipusher 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nonebot_plugin_anipusher-0.1.0/LICENSE +21 -0
- nonebot_plugin_anipusher-0.1.0/PKG-INFO +173 -0
- nonebot_plugin_anipusher-0.1.0/README.md +152 -0
- nonebot_plugin_anipusher-0.1.0/nonebot_plugin_anipusher.egg-info/PKG-INFO +173 -0
- nonebot_plugin_anipusher-0.1.0/nonebot_plugin_anipusher.egg-info/SOURCES.txt +41 -0
- nonebot_plugin_anipusher-0.1.0/nonebot_plugin_anipusher.egg-info/dependency_links.txt +1 -0
- nonebot_plugin_anipusher-0.1.0/nonebot_plugin_anipusher.egg-info/requires.txt +8 -0
- nonebot_plugin_anipusher-0.1.0/nonebot_plugin_anipusher.egg-info/top_level.txt +1 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/__init__.py +13 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/config/__init__.py +6 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/config/config.py +12 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/config/global_config.py +40 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/config/json_io.py +53 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/constants/error_handling.py +88 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/core/commands_core/__init__.py +4 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/core/commands_core/check.py +28 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/core/commands_core/function.py +239 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/core/monitor_core/abstract_processor.py +119 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/core/monitor_core/health_check.py +539 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/core/monitor_core/monitor.py +39 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/core/monitor_core/processing_engine.py +76 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/core/monitor_core/processor/anime_process.py +277 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/core/monitor_core/processor/anirss_processor.py +161 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/core/monitor_core/processor/emby_processor.py +482 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/core/push_core/__init__.py +4 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/core/push_core/fill.py +62 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/core/push_core/message_template.py +22 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/core/push_core/push.py +46 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/core/push_core/pusher.py +549 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/database/__init__.py +8 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/database/dao.py +154 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/database/database_manager.py +68 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/database/db_health_check.py +81 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/database/query_builder.py +222 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/database/table_structure.py +162 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/external/__init__.py +9 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/external/image_verification.py +120 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/external/requests.py +41 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/external/tmdb_request.py +81 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/others/utils.py +123 -0
- nonebot_plugin_anipusher-0.1.0/plugins/nonebot_plugin_AniPush/starter.py +15 -0
- nonebot_plugin_anipusher-0.1.0/pyproject.toml +43 -0
- nonebot_plugin_anipusher-0.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Ariadust
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nonebot-plugin-anipusher
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: NoneBot plugin for pushing ani-rss/emby webhooks to QQ
|
|
5
|
+
Author-email: AriadusTT <980868243@qq.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Repository, https://github.com/AriadusTT/nonebot-plugin-AniPusher
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
9
|
+
Requires-Python: <4.0,>=3.9
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: nonebot-plugin-apscheduler
|
|
13
|
+
Requires-Dist: httpx
|
|
14
|
+
Requires-Dist: aiohttp==3.11.14
|
|
15
|
+
Requires-Dist: DBUtils==3.1.0
|
|
16
|
+
Requires-Dist: fastapi==0.116.1
|
|
17
|
+
Requires-Dist: nonebot==1.9.1
|
|
18
|
+
Requires-Dist: pydantic==1.10.21
|
|
19
|
+
Requires-Dist: python-dotenv==1.1.1
|
|
20
|
+
Dynamic: license-file
|
|
21
|
+
|
|
22
|
+
<div align="center">
|
|
23
|
+
<a href="https://v2.nonebot.dev/store"><img src="https://v2.nonebot.dev/logo.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
|
|
24
|
+
<br>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<div align="center">
|
|
28
|
+
|
|
29
|
+
# nonebot-plugin-AniPusher
|
|
30
|
+
|
|
31
|
+
_✨ NoneBot AniPusher插件 ✨_<br>
|
|
32
|
+
NoneBot AniPusher插件 是将特定Webhooks消息推送至QQ的插件<br>
|
|
33
|
+
目前支持配置来自ani-rss和emby的webhooks消息
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
[](./LICENSE)
|
|
38
|
+
[](https://pypi.python.org/pypi/nonebot-plugin-AniPusher)
|
|
39
|
+
[](https://www.python.org/downloads/)
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## 📖 介绍
|
|
44
|
+
|
|
45
|
+
AniPusher插件 是将特定Webhook消息推送至QQ的插件<br>
|
|
46
|
+
|
|
47
|
+
目前支持AniRSS和Emby推送<br>
|
|
48
|
+
|
|
49
|
+

|
|
50
|
+
|
|
51
|
+
## 💿 安装
|
|
52
|
+
|
|
53
|
+
<details open>
|
|
54
|
+
<summary>使用 nb-cli 安装</summary>
|
|
55
|
+
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
|
|
56
|
+
|
|
57
|
+
nb plugin install nonebot-plugin-AniPusher
|
|
58
|
+
|
|
59
|
+
</details>
|
|
60
|
+
|
|
61
|
+
<details>
|
|
62
|
+
<summary>使用包管理器安装</summary>
|
|
63
|
+
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
|
|
64
|
+
|
|
65
|
+
<details>
|
|
66
|
+
<summary>pip</summary>
|
|
67
|
+
|
|
68
|
+
pip install nonebot-plugin-AniPusher
|
|
69
|
+
</details>
|
|
70
|
+
<details>
|
|
71
|
+
<summary>pdm</summary>
|
|
72
|
+
|
|
73
|
+
pdm add nonebot-plugin-AniPusher
|
|
74
|
+
</details>
|
|
75
|
+
<details>
|
|
76
|
+
<summary>poetry</summary>
|
|
77
|
+
|
|
78
|
+
poetry add nonebot-plugin-AniPusher
|
|
79
|
+
</details>
|
|
80
|
+
<details>
|
|
81
|
+
<summary>conda</summary>
|
|
82
|
+
|
|
83
|
+
conda install nonebot-plugin-AniPusher
|
|
84
|
+
</details>
|
|
85
|
+
|
|
86
|
+
打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入
|
|
87
|
+
|
|
88
|
+
plugins = ["nonebot_plugin_AniPusher"]
|
|
89
|
+
|
|
90
|
+
</details>
|
|
91
|
+
|
|
92
|
+
## ⚙️ ani-rss配置[[ani-rss项目地址](https://github.com/wushuo894/ani-rss)]
|
|
93
|
+
该配置方法基于ani-rss `v2.0.13` 更新后新的通知配置功能<br>
|
|
94
|
+
|
|
95
|
+
`ani-rss → 设置 → 通知 → 添加通知`<br>
|
|
96
|
+
↓按如下配置↓<br>
|
|
97
|
+

|
|
98
|
+
|
|
99
|
+
通知类型为`Webhook`<br>
|
|
100
|
+
Method为`POST`<br>
|
|
101
|
+
URL为Nonebot2的IP地址和端口下的路径`/webhook`<br>
|
|
102
|
+
例如`http://Nonebot_IP:8080/webhook`<br>
|
|
103
|
+
|
|
104
|
+
↓Body请复制下方Json填入↓<br>
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"ani": "${action}",
|
|
109
|
+
"action": "${action}",
|
|
110
|
+
"title": "${title}",
|
|
111
|
+
"jpTitle": "${jpTitle}",
|
|
112
|
+
"score": "${score}",
|
|
113
|
+
"themoviedbName": "${themoviedbName}",
|
|
114
|
+
"tmdbid": "${tmdbid}",
|
|
115
|
+
"tmdbUrl": "${tmdburl}",
|
|
116
|
+
"bgmUrl": "${bgmUrl}",
|
|
117
|
+
"season": "${season}",
|
|
118
|
+
"episode": "${episode}",
|
|
119
|
+
"subgroup": "${subgroup}",
|
|
120
|
+
"progress": "${currentEpisodeNumber}/${totalEpisodeNumber}",
|
|
121
|
+
"premiere": "${year}-${month}-${date}",
|
|
122
|
+
"text": "${text}",
|
|
123
|
+
"downloadPath": "${downloadPath}",
|
|
124
|
+
"episodeTitle": "${episodeTitle}",
|
|
125
|
+
"bgmEpisodeTitle": "${bgmEpisodeTitle}",
|
|
126
|
+
"bgmJpEpisodeTitle": "${bgmJpEpisodeTitle}",
|
|
127
|
+
"image": "${image}"
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
> [!TIP]
|
|
131
|
+
> 如果未来AniRSS更新通知配置发生变化,需更改Body结构时,请保留键```"ani": "${action}"```,程序判断数据来源依赖此键!<br>
|
|
132
|
+
> 其余键值对可根据ani-rss的使用文档中通知下的通知模板对应的键结构进行更改<br>
|
|
133
|
+
|
|
134
|
+
## ⚙️ Emby配置
|
|
135
|
+
首先请确保你已在Emby服务器上安装了Webhooks插件(该插件目前已自动集成,应该不用再手动装了)<br>
|
|
136
|
+
|
|
137
|
+
`Emby → 设置 → 通知 → 添加通知 -> Webhooks`<br>
|
|
138
|
+
↓按如下配置↓<br>
|
|
139
|
+

|
|
140
|
+
|
|
141
|
+
网址为Nonebot2的IP地址和端口下的路径`/webhook`<br>
|
|
142
|
+
例如`http://Nonebot_IP:8080/webhook`<br>
|
|
143
|
+
请求内容类型为`application/json`<br>
|
|
144
|
+
Event目前只支持`媒体库-新媒体已添加`<br>
|
|
145
|
+
其他选项根据自身需求更改<br>
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
## ⚙️ 插件配置
|
|
149
|
+
|
|
150
|
+
配置项位于 nonebot2 项目根目录下的 `.env` 文件内<br>
|
|
151
|
+
运行时如果没有检查到配置项,插件将自动在`.env` 文件内创建配置项,前往按照说明填入即可。<br>
|
|
152
|
+
所有配置项均为非必选项,但建议填写。配置项缺失会导致对应功能被关闭。<br>
|
|
153
|
+
|
|
154
|
+
> [!IMPORTANT]
|
|
155
|
+
> 缺少Emby_Host或Emby_ApiKey时,插件将无法验证视觉图有效性,不会下载或更新封面图片。<br>
|
|
156
|
+
> 缺少Tmdb_ApiKey时,插件将无法验证TMDB ID,导致数据无法存入数据库,无法订阅对应内容。<br>
|
|
157
|
+
> 缺少Tmdb_Proxy时,插件将仅尝试直连TMDB API,如失败则无法验证TMDB ID,导致数据无法存入数据库,无法订阅对应内容。<br>
|
|
158
|
+
|
|
159
|
+
| 配置项 | 必填 | 默认值 | 说明 |
|
|
160
|
+
|:----|:----:|:----:|:----:|
|
|
161
|
+
| anipush__emby_host | 否 | 无 | Emby的服务器地址(请勿填写中转地址)|
|
|
162
|
+
| anipush__emby_apikey | 否 | 无 | Emby服务器-高级-API密钥中生成的密钥 |
|
|
163
|
+
| anipush__tmdb_apikey | 否 | 无 | TMDB用户的ApiKey|
|
|
164
|
+
| anipush__tmdb_proxy | 否 | 无 | TMDB代理,如不填写则不使用代理 |
|
|
165
|
+
|
|
166
|
+
## 🎉 使用
|
|
167
|
+
### 指令表
|
|
168
|
+
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|
|
169
|
+
|:-----|:----:|:----:|:----:|:----|
|
|
170
|
+
| 注册Emby推送 | ALL | 否 | 私聊/群聊 | 群聊:发送指令后即将群组添加到Emby更新消息推送列表中,有新消息时将消息推送到群内<br>私聊:发送指令后即将用户添加到Emby更新消息推送列表中 |
|
|
171
|
+
| 注册AniRSS推送 | ALL | 否 | 私聊/群聊 | 群聊:发送指令后即将群组添加到AniRSS更新消息推送列表中,有新消息时将消息推送到群内<br>私聊:发送指令后即将用户添加到AniRSS更新消息推送列表中 |
|
|
172
|
+
| 取消Emby推送 | ALL | 否 | 私聊/群聊 | 群聊:发送指令后关闭群组更新消息推送,不再接收推送<br>私聊:发送指令后关闭用户更新消息推送,不再接收推送 |
|
|
173
|
+
| 取消AniRSS推送 | ALL | 否 | 私聊/群聊 | 群聊:发送指令后关闭群组更新消息推送,不再接收推送<br>私聊:发送指令后关闭用户更新消息推送,不再接收推送 |
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<a href="https://v2.nonebot.dev/store"><img src="https://v2.nonebot.dev/logo.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
|
|
3
|
+
<br>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
<div align="center">
|
|
7
|
+
|
|
8
|
+
# nonebot-plugin-AniPusher
|
|
9
|
+
|
|
10
|
+
_✨ NoneBot AniPusher插件 ✨_<br>
|
|
11
|
+
NoneBot AniPusher插件 是将特定Webhooks消息推送至QQ的插件<br>
|
|
12
|
+
目前支持配置来自ani-rss和emby的webhooks消息
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
[](./LICENSE)
|
|
17
|
+
[](https://pypi.python.org/pypi/nonebot-plugin-AniPusher)
|
|
18
|
+
[](https://www.python.org/downloads/)
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## 📖 介绍
|
|
23
|
+
|
|
24
|
+
AniPusher插件 是将特定Webhook消息推送至QQ的插件<br>
|
|
25
|
+
|
|
26
|
+
目前支持AniRSS和Emby推送<br>
|
|
27
|
+
|
|
28
|
+

|
|
29
|
+
|
|
30
|
+
## 💿 安装
|
|
31
|
+
|
|
32
|
+
<details open>
|
|
33
|
+
<summary>使用 nb-cli 安装</summary>
|
|
34
|
+
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
|
|
35
|
+
|
|
36
|
+
nb plugin install nonebot-plugin-AniPusher
|
|
37
|
+
|
|
38
|
+
</details>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary>使用包管理器安装</summary>
|
|
42
|
+
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
|
|
43
|
+
|
|
44
|
+
<details>
|
|
45
|
+
<summary>pip</summary>
|
|
46
|
+
|
|
47
|
+
pip install nonebot-plugin-AniPusher
|
|
48
|
+
</details>
|
|
49
|
+
<details>
|
|
50
|
+
<summary>pdm</summary>
|
|
51
|
+
|
|
52
|
+
pdm add nonebot-plugin-AniPusher
|
|
53
|
+
</details>
|
|
54
|
+
<details>
|
|
55
|
+
<summary>poetry</summary>
|
|
56
|
+
|
|
57
|
+
poetry add nonebot-plugin-AniPusher
|
|
58
|
+
</details>
|
|
59
|
+
<details>
|
|
60
|
+
<summary>conda</summary>
|
|
61
|
+
|
|
62
|
+
conda install nonebot-plugin-AniPusher
|
|
63
|
+
</details>
|
|
64
|
+
|
|
65
|
+
打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入
|
|
66
|
+
|
|
67
|
+
plugins = ["nonebot_plugin_AniPusher"]
|
|
68
|
+
|
|
69
|
+
</details>
|
|
70
|
+
|
|
71
|
+
## ⚙️ ani-rss配置[[ani-rss项目地址](https://github.com/wushuo894/ani-rss)]
|
|
72
|
+
该配置方法基于ani-rss `v2.0.13` 更新后新的通知配置功能<br>
|
|
73
|
+
|
|
74
|
+
`ani-rss → 设置 → 通知 → 添加通知`<br>
|
|
75
|
+
↓按如下配置↓<br>
|
|
76
|
+

|
|
77
|
+
|
|
78
|
+
通知类型为`Webhook`<br>
|
|
79
|
+
Method为`POST`<br>
|
|
80
|
+
URL为Nonebot2的IP地址和端口下的路径`/webhook`<br>
|
|
81
|
+
例如`http://Nonebot_IP:8080/webhook`<br>
|
|
82
|
+
|
|
83
|
+
↓Body请复制下方Json填入↓<br>
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"ani": "${action}",
|
|
88
|
+
"action": "${action}",
|
|
89
|
+
"title": "${title}",
|
|
90
|
+
"jpTitle": "${jpTitle}",
|
|
91
|
+
"score": "${score}",
|
|
92
|
+
"themoviedbName": "${themoviedbName}",
|
|
93
|
+
"tmdbid": "${tmdbid}",
|
|
94
|
+
"tmdbUrl": "${tmdburl}",
|
|
95
|
+
"bgmUrl": "${bgmUrl}",
|
|
96
|
+
"season": "${season}",
|
|
97
|
+
"episode": "${episode}",
|
|
98
|
+
"subgroup": "${subgroup}",
|
|
99
|
+
"progress": "${currentEpisodeNumber}/${totalEpisodeNumber}",
|
|
100
|
+
"premiere": "${year}-${month}-${date}",
|
|
101
|
+
"text": "${text}",
|
|
102
|
+
"downloadPath": "${downloadPath}",
|
|
103
|
+
"episodeTitle": "${episodeTitle}",
|
|
104
|
+
"bgmEpisodeTitle": "${bgmEpisodeTitle}",
|
|
105
|
+
"bgmJpEpisodeTitle": "${bgmJpEpisodeTitle}",
|
|
106
|
+
"image": "${image}"
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
> [!TIP]
|
|
110
|
+
> 如果未来AniRSS更新通知配置发生变化,需更改Body结构时,请保留键```"ani": "${action}"```,程序判断数据来源依赖此键!<br>
|
|
111
|
+
> 其余键值对可根据ani-rss的使用文档中通知下的通知模板对应的键结构进行更改<br>
|
|
112
|
+
|
|
113
|
+
## ⚙️ Emby配置
|
|
114
|
+
首先请确保你已在Emby服务器上安装了Webhooks插件(该插件目前已自动集成,应该不用再手动装了)<br>
|
|
115
|
+
|
|
116
|
+
`Emby → 设置 → 通知 → 添加通知 -> Webhooks`<br>
|
|
117
|
+
↓按如下配置↓<br>
|
|
118
|
+

|
|
119
|
+
|
|
120
|
+
网址为Nonebot2的IP地址和端口下的路径`/webhook`<br>
|
|
121
|
+
例如`http://Nonebot_IP:8080/webhook`<br>
|
|
122
|
+
请求内容类型为`application/json`<br>
|
|
123
|
+
Event目前只支持`媒体库-新媒体已添加`<br>
|
|
124
|
+
其他选项根据自身需求更改<br>
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
## ⚙️ 插件配置
|
|
128
|
+
|
|
129
|
+
配置项位于 nonebot2 项目根目录下的 `.env` 文件内<br>
|
|
130
|
+
运行时如果没有检查到配置项,插件将自动在`.env` 文件内创建配置项,前往按照说明填入即可。<br>
|
|
131
|
+
所有配置项均为非必选项,但建议填写。配置项缺失会导致对应功能被关闭。<br>
|
|
132
|
+
|
|
133
|
+
> [!IMPORTANT]
|
|
134
|
+
> 缺少Emby_Host或Emby_ApiKey时,插件将无法验证视觉图有效性,不会下载或更新封面图片。<br>
|
|
135
|
+
> 缺少Tmdb_ApiKey时,插件将无法验证TMDB ID,导致数据无法存入数据库,无法订阅对应内容。<br>
|
|
136
|
+
> 缺少Tmdb_Proxy时,插件将仅尝试直连TMDB API,如失败则无法验证TMDB ID,导致数据无法存入数据库,无法订阅对应内容。<br>
|
|
137
|
+
|
|
138
|
+
| 配置项 | 必填 | 默认值 | 说明 |
|
|
139
|
+
|:----|:----:|:----:|:----:|
|
|
140
|
+
| anipush__emby_host | 否 | 无 | Emby的服务器地址(请勿填写中转地址)|
|
|
141
|
+
| anipush__emby_apikey | 否 | 无 | Emby服务器-高级-API密钥中生成的密钥 |
|
|
142
|
+
| anipush__tmdb_apikey | 否 | 无 | TMDB用户的ApiKey|
|
|
143
|
+
| anipush__tmdb_proxy | 否 | 无 | TMDB代理,如不填写则不使用代理 |
|
|
144
|
+
|
|
145
|
+
## 🎉 使用
|
|
146
|
+
### 指令表
|
|
147
|
+
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|
|
148
|
+
|:-----|:----:|:----:|:----:|:----|
|
|
149
|
+
| 注册Emby推送 | ALL | 否 | 私聊/群聊 | 群聊:发送指令后即将群组添加到Emby更新消息推送列表中,有新消息时将消息推送到群内<br>私聊:发送指令后即将用户添加到Emby更新消息推送列表中 |
|
|
150
|
+
| 注册AniRSS推送 | ALL | 否 | 私聊/群聊 | 群聊:发送指令后即将群组添加到AniRSS更新消息推送列表中,有新消息时将消息推送到群内<br>私聊:发送指令后即将用户添加到AniRSS更新消息推送列表中 |
|
|
151
|
+
| 取消Emby推送 | ALL | 否 | 私聊/群聊 | 群聊:发送指令后关闭群组更新消息推送,不再接收推送<br>私聊:发送指令后关闭用户更新消息推送,不再接收推送 |
|
|
152
|
+
| 取消AniRSS推送 | ALL | 否 | 私聊/群聊 | 群聊:发送指令后关闭群组更新消息推送,不再接收推送<br>私聊:发送指令后关闭用户更新消息推送,不再接收推送 |
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nonebot-plugin-anipusher
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: NoneBot plugin for pushing ani-rss/emby webhooks to QQ
|
|
5
|
+
Author-email: AriadusTT <980868243@qq.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Repository, https://github.com/AriadusTT/nonebot-plugin-AniPusher
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
9
|
+
Requires-Python: <4.0,>=3.9
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: nonebot-plugin-apscheduler
|
|
13
|
+
Requires-Dist: httpx
|
|
14
|
+
Requires-Dist: aiohttp==3.11.14
|
|
15
|
+
Requires-Dist: DBUtils==3.1.0
|
|
16
|
+
Requires-Dist: fastapi==0.116.1
|
|
17
|
+
Requires-Dist: nonebot==1.9.1
|
|
18
|
+
Requires-Dist: pydantic==1.10.21
|
|
19
|
+
Requires-Dist: python-dotenv==1.1.1
|
|
20
|
+
Dynamic: license-file
|
|
21
|
+
|
|
22
|
+
<div align="center">
|
|
23
|
+
<a href="https://v2.nonebot.dev/store"><img src="https://v2.nonebot.dev/logo.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
|
|
24
|
+
<br>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<div align="center">
|
|
28
|
+
|
|
29
|
+
# nonebot-plugin-AniPusher
|
|
30
|
+
|
|
31
|
+
_✨ NoneBot AniPusher插件 ✨_<br>
|
|
32
|
+
NoneBot AniPusher插件 是将特定Webhooks消息推送至QQ的插件<br>
|
|
33
|
+
目前支持配置来自ani-rss和emby的webhooks消息
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
[](./LICENSE)
|
|
38
|
+
[](https://pypi.python.org/pypi/nonebot-plugin-AniPusher)
|
|
39
|
+
[](https://www.python.org/downloads/)
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## 📖 介绍
|
|
44
|
+
|
|
45
|
+
AniPusher插件 是将特定Webhook消息推送至QQ的插件<br>
|
|
46
|
+
|
|
47
|
+
目前支持AniRSS和Emby推送<br>
|
|
48
|
+
|
|
49
|
+

|
|
50
|
+
|
|
51
|
+
## 💿 安装
|
|
52
|
+
|
|
53
|
+
<details open>
|
|
54
|
+
<summary>使用 nb-cli 安装</summary>
|
|
55
|
+
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
|
|
56
|
+
|
|
57
|
+
nb plugin install nonebot-plugin-AniPusher
|
|
58
|
+
|
|
59
|
+
</details>
|
|
60
|
+
|
|
61
|
+
<details>
|
|
62
|
+
<summary>使用包管理器安装</summary>
|
|
63
|
+
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
|
|
64
|
+
|
|
65
|
+
<details>
|
|
66
|
+
<summary>pip</summary>
|
|
67
|
+
|
|
68
|
+
pip install nonebot-plugin-AniPusher
|
|
69
|
+
</details>
|
|
70
|
+
<details>
|
|
71
|
+
<summary>pdm</summary>
|
|
72
|
+
|
|
73
|
+
pdm add nonebot-plugin-AniPusher
|
|
74
|
+
</details>
|
|
75
|
+
<details>
|
|
76
|
+
<summary>poetry</summary>
|
|
77
|
+
|
|
78
|
+
poetry add nonebot-plugin-AniPusher
|
|
79
|
+
</details>
|
|
80
|
+
<details>
|
|
81
|
+
<summary>conda</summary>
|
|
82
|
+
|
|
83
|
+
conda install nonebot-plugin-AniPusher
|
|
84
|
+
</details>
|
|
85
|
+
|
|
86
|
+
打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入
|
|
87
|
+
|
|
88
|
+
plugins = ["nonebot_plugin_AniPusher"]
|
|
89
|
+
|
|
90
|
+
</details>
|
|
91
|
+
|
|
92
|
+
## ⚙️ ani-rss配置[[ani-rss项目地址](https://github.com/wushuo894/ani-rss)]
|
|
93
|
+
该配置方法基于ani-rss `v2.0.13` 更新后新的通知配置功能<br>
|
|
94
|
+
|
|
95
|
+
`ani-rss → 设置 → 通知 → 添加通知`<br>
|
|
96
|
+
↓按如下配置↓<br>
|
|
97
|
+

|
|
98
|
+
|
|
99
|
+
通知类型为`Webhook`<br>
|
|
100
|
+
Method为`POST`<br>
|
|
101
|
+
URL为Nonebot2的IP地址和端口下的路径`/webhook`<br>
|
|
102
|
+
例如`http://Nonebot_IP:8080/webhook`<br>
|
|
103
|
+
|
|
104
|
+
↓Body请复制下方Json填入↓<br>
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"ani": "${action}",
|
|
109
|
+
"action": "${action}",
|
|
110
|
+
"title": "${title}",
|
|
111
|
+
"jpTitle": "${jpTitle}",
|
|
112
|
+
"score": "${score}",
|
|
113
|
+
"themoviedbName": "${themoviedbName}",
|
|
114
|
+
"tmdbid": "${tmdbid}",
|
|
115
|
+
"tmdbUrl": "${tmdburl}",
|
|
116
|
+
"bgmUrl": "${bgmUrl}",
|
|
117
|
+
"season": "${season}",
|
|
118
|
+
"episode": "${episode}",
|
|
119
|
+
"subgroup": "${subgroup}",
|
|
120
|
+
"progress": "${currentEpisodeNumber}/${totalEpisodeNumber}",
|
|
121
|
+
"premiere": "${year}-${month}-${date}",
|
|
122
|
+
"text": "${text}",
|
|
123
|
+
"downloadPath": "${downloadPath}",
|
|
124
|
+
"episodeTitle": "${episodeTitle}",
|
|
125
|
+
"bgmEpisodeTitle": "${bgmEpisodeTitle}",
|
|
126
|
+
"bgmJpEpisodeTitle": "${bgmJpEpisodeTitle}",
|
|
127
|
+
"image": "${image}"
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
> [!TIP]
|
|
131
|
+
> 如果未来AniRSS更新通知配置发生变化,需更改Body结构时,请保留键```"ani": "${action}"```,程序判断数据来源依赖此键!<br>
|
|
132
|
+
> 其余键值对可根据ani-rss的使用文档中通知下的通知模板对应的键结构进行更改<br>
|
|
133
|
+
|
|
134
|
+
## ⚙️ Emby配置
|
|
135
|
+
首先请确保你已在Emby服务器上安装了Webhooks插件(该插件目前已自动集成,应该不用再手动装了)<br>
|
|
136
|
+
|
|
137
|
+
`Emby → 设置 → 通知 → 添加通知 -> Webhooks`<br>
|
|
138
|
+
↓按如下配置↓<br>
|
|
139
|
+

|
|
140
|
+
|
|
141
|
+
网址为Nonebot2的IP地址和端口下的路径`/webhook`<br>
|
|
142
|
+
例如`http://Nonebot_IP:8080/webhook`<br>
|
|
143
|
+
请求内容类型为`application/json`<br>
|
|
144
|
+
Event目前只支持`媒体库-新媒体已添加`<br>
|
|
145
|
+
其他选项根据自身需求更改<br>
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
## ⚙️ 插件配置
|
|
149
|
+
|
|
150
|
+
配置项位于 nonebot2 项目根目录下的 `.env` 文件内<br>
|
|
151
|
+
运行时如果没有检查到配置项,插件将自动在`.env` 文件内创建配置项,前往按照说明填入即可。<br>
|
|
152
|
+
所有配置项均为非必选项,但建议填写。配置项缺失会导致对应功能被关闭。<br>
|
|
153
|
+
|
|
154
|
+
> [!IMPORTANT]
|
|
155
|
+
> 缺少Emby_Host或Emby_ApiKey时,插件将无法验证视觉图有效性,不会下载或更新封面图片。<br>
|
|
156
|
+
> 缺少Tmdb_ApiKey时,插件将无法验证TMDB ID,导致数据无法存入数据库,无法订阅对应内容。<br>
|
|
157
|
+
> 缺少Tmdb_Proxy时,插件将仅尝试直连TMDB API,如失败则无法验证TMDB ID,导致数据无法存入数据库,无法订阅对应内容。<br>
|
|
158
|
+
|
|
159
|
+
| 配置项 | 必填 | 默认值 | 说明 |
|
|
160
|
+
|:----|:----:|:----:|:----:|
|
|
161
|
+
| anipush__emby_host | 否 | 无 | Emby的服务器地址(请勿填写中转地址)|
|
|
162
|
+
| anipush__emby_apikey | 否 | 无 | Emby服务器-高级-API密钥中生成的密钥 |
|
|
163
|
+
| anipush__tmdb_apikey | 否 | 无 | TMDB用户的ApiKey|
|
|
164
|
+
| anipush__tmdb_proxy | 否 | 无 | TMDB代理,如不填写则不使用代理 |
|
|
165
|
+
|
|
166
|
+
## 🎉 使用
|
|
167
|
+
### 指令表
|
|
168
|
+
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|
|
169
|
+
|:-----|:----:|:----:|:----:|:----|
|
|
170
|
+
| 注册Emby推送 | ALL | 否 | 私聊/群聊 | 群聊:发送指令后即将群组添加到Emby更新消息推送列表中,有新消息时将消息推送到群内<br>私聊:发送指令后即将用户添加到Emby更新消息推送列表中 |
|
|
171
|
+
| 注册AniRSS推送 | ALL | 否 | 私聊/群聊 | 群聊:发送指令后即将群组添加到AniRSS更新消息推送列表中,有新消息时将消息推送到群内<br>私聊:发送指令后即将用户添加到AniRSS更新消息推送列表中 |
|
|
172
|
+
| 取消Emby推送 | ALL | 否 | 私聊/群聊 | 群聊:发送指令后关闭群组更新消息推送,不再接收推送<br>私聊:发送指令后关闭用户更新消息推送,不再接收推送 |
|
|
173
|
+
| 取消AniRSS推送 | ALL | 否 | 私聊/群聊 | 群聊:发送指令后关闭群组更新消息推送,不再接收推送<br>私聊:发送指令后关闭用户更新消息推送,不再接收推送 |
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
nonebot_plugin_anipusher.egg-info/PKG-INFO
|
|
5
|
+
nonebot_plugin_anipusher.egg-info/SOURCES.txt
|
|
6
|
+
nonebot_plugin_anipusher.egg-info/dependency_links.txt
|
|
7
|
+
nonebot_plugin_anipusher.egg-info/requires.txt
|
|
8
|
+
nonebot_plugin_anipusher.egg-info/top_level.txt
|
|
9
|
+
plugins/nonebot_plugin_AniPush/__init__.py
|
|
10
|
+
plugins/nonebot_plugin_AniPush/starter.py
|
|
11
|
+
plugins/nonebot_plugin_AniPush/config/__init__.py
|
|
12
|
+
plugins/nonebot_plugin_AniPush/config/config.py
|
|
13
|
+
plugins/nonebot_plugin_AniPush/config/global_config.py
|
|
14
|
+
plugins/nonebot_plugin_AniPush/config/json_io.py
|
|
15
|
+
plugins/nonebot_plugin_AniPush/constants/error_handling.py
|
|
16
|
+
plugins/nonebot_plugin_AniPush/core/commands_core/__init__.py
|
|
17
|
+
plugins/nonebot_plugin_AniPush/core/commands_core/check.py
|
|
18
|
+
plugins/nonebot_plugin_AniPush/core/commands_core/function.py
|
|
19
|
+
plugins/nonebot_plugin_AniPush/core/monitor_core/abstract_processor.py
|
|
20
|
+
plugins/nonebot_plugin_AniPush/core/monitor_core/health_check.py
|
|
21
|
+
plugins/nonebot_plugin_AniPush/core/monitor_core/monitor.py
|
|
22
|
+
plugins/nonebot_plugin_AniPush/core/monitor_core/processing_engine.py
|
|
23
|
+
plugins/nonebot_plugin_AniPush/core/monitor_core/processor/anime_process.py
|
|
24
|
+
plugins/nonebot_plugin_AniPush/core/monitor_core/processor/anirss_processor.py
|
|
25
|
+
plugins/nonebot_plugin_AniPush/core/monitor_core/processor/emby_processor.py
|
|
26
|
+
plugins/nonebot_plugin_AniPush/core/push_core/__init__.py
|
|
27
|
+
plugins/nonebot_plugin_AniPush/core/push_core/fill.py
|
|
28
|
+
plugins/nonebot_plugin_AniPush/core/push_core/message_template.py
|
|
29
|
+
plugins/nonebot_plugin_AniPush/core/push_core/push.py
|
|
30
|
+
plugins/nonebot_plugin_AniPush/core/push_core/pusher.py
|
|
31
|
+
plugins/nonebot_plugin_AniPush/database/__init__.py
|
|
32
|
+
plugins/nonebot_plugin_AniPush/database/dao.py
|
|
33
|
+
plugins/nonebot_plugin_AniPush/database/database_manager.py
|
|
34
|
+
plugins/nonebot_plugin_AniPush/database/db_health_check.py
|
|
35
|
+
plugins/nonebot_plugin_AniPush/database/query_builder.py
|
|
36
|
+
plugins/nonebot_plugin_AniPush/database/table_structure.py
|
|
37
|
+
plugins/nonebot_plugin_AniPush/external/__init__.py
|
|
38
|
+
plugins/nonebot_plugin_AniPush/external/image_verification.py
|
|
39
|
+
plugins/nonebot_plugin_AniPush/external/requests.py
|
|
40
|
+
plugins/nonebot_plugin_AniPush/external/tmdb_request.py
|
|
41
|
+
plugins/nonebot_plugin_AniPush/others/utils.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
plugins
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
from nonebot.plugin import PluginMetadata
|
|
3
|
+
|
|
4
|
+
__plugin_meta__ = PluginMetadata(
|
|
5
|
+
name="AniPusher",
|
|
6
|
+
description="AniPusher:一个动画更新推送插件,支持Emby及AniRss的Webhook信息推送",
|
|
7
|
+
usage="AniPusher:一个动画更新推送插件,支持Emby及AniRss的Webhook信息推送",
|
|
8
|
+
type="application",
|
|
9
|
+
homepage="https://github.com/AriadusTT/nonebot-plugin-AniPush",
|
|
10
|
+
supported_adapters={"~onebot.v11"}
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
from . import starter
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
class AppConfig:
|
|
2
|
+
"""存储应用程序配置参数"""
|
|
3
|
+
|
|
4
|
+
def __init__(self):
|
|
5
|
+
self.proxy: str | None = None # 代理服务器地址
|
|
6
|
+
self.tmdb_authorization: str | None = None # TMDB API密钥
|
|
7
|
+
self.emby_host: str | None = None # Emby服务器地址
|
|
8
|
+
self.emby_key: str | None = None # Emby API密钥
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FeatureFlags:
|
|
12
|
+
"""管理功能开关状态"""
|
|
13
|
+
|
|
14
|
+
def __init__(self):
|
|
15
|
+
self.emby_enabled: bool = False # Emby功能开关
|
|
16
|
+
self.tmdb_enabled: bool = False # TMDB功能开关
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class PushTarget:
|
|
20
|
+
"""存储工作用户信息"""
|
|
21
|
+
|
|
22
|
+
def __init__(self):
|
|
23
|
+
self.GroupPushTarget: dict = {} # 工作用户
|
|
24
|
+
self.PrivatePushTarget: dict = {} # 工作用户
|
|
25
|
+
"""
|
|
26
|
+
示例:
|
|
27
|
+
GroupPushTarget结构
|
|
28
|
+
key为DatabaseTables.TableName枚举值,value为list,存储工作群组ID
|
|
29
|
+
{
|
|
30
|
+
"Ani_RSS":[],
|
|
31
|
+
"Emby":[]
|
|
32
|
+
}
|
|
33
|
+
PrivatePushTarget结构类似
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# 全局单例对象
|
|
38
|
+
APPCONFIG = AppConfig()
|
|
39
|
+
FUNCTION = FeatureFlags()
|
|
40
|
+
PUSHTARGET = PushTarget()
|