NoneBot plugin for pushing ani-rss/emby webhooks to QQ
Project description
nonebot-plugin-AniPusher
✨ NoneBot AniPusher插件 ✨
NoneBot AniPusher插件 是将特定Webhooks消息推送至QQ的插件
目前支持配置来自ani-rss和emby的webhooks消息
[!IMPORTANT] 重大更新,请务必查看新的配置方式与功能列表
📖 介绍
AniPusher插件 是将特定Webhook消息推送至QQ的插件
目前支持AniRSS和Emby推送
💿 安装
任选一种方式安装即可
安装完成后打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot-plugin-anipusher"]
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-anipusher
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-anipusher
pdm
pdm add nonebot-plugin-anipusher
poetry
poetry add nonebot-plugin-anipusher
conda
conda install nonebot-plugin-anipusher
⚙️ ani-rss配置[ani-rss]
该配置方法基于ani-rss v2.0.13 更新后新的通知配置功能
ani-rss → 设置 → 通知 → 添加通知
↓按如下配置↓
通知类型为Webhook
Method为POST
URL为Nonebot2的IP地址和端口下的路径/webhook
例如http://Nonebot_IP:8080/webhook
↓Body请复制下方Json填入↓
{
"ani": "${action}",
"action": "${action}",
"title": "${title}",
"jpTitle": "${jpTitle}",
"score": "${score}",
"themoviedbName": "${themoviedbName}",
"tmdbid": "${tmdbid}",
"tmdbUrl": "${tmdburl}",
"bgmUrl": "${bgmUrl}",
"season": "${season}",
"episode": "${episode}",
"subgroup": "${subgroup}",
"progress": "${currentEpisodeNumber}/${totalEpisodeNumber}",
"premiere": "${year}-${month}-${date}",
"text": "${text}",
"downloadPath": "${downloadPath}",
"episodeTitle": "${episodeTitle}",
"bgmEpisodeTitle": "${bgmEpisodeTitle}",
"bgmJpEpisodeTitle": "${bgmJpEpisodeTitle}",
"image": "${image}"
}
[!TIP] 如果未来AniRSS更新通知配置发生变化,需更改Body结构时,请保留键
"ani": "${action}",程序判断数据来源依赖此键!
其余键值对可根据ani-rss的使用文档中通知下的通知模板对应的键结构进行更改
⚙️ Emby配置
首先请确保你已在Emby服务器上安装了Webhooks插件(该插件目前已自动集成,应该不用再手动装了)
Emby → 设置 → 通知 → 添加通知 -> Webhooks
按如下配置
网址为Nonebot2的IP地址和端口下的路径/webhook
例如http://Nonebot_IP:8080/webhook
请求内容类型为application/json
Event目前只支持媒体库-新媒体已添加
其他选项根据自身需求更改
⚙️ 插件配置
配置项位于 nonebot2 项目根目录下的 .env 文件内
如果没有配置插件项插件会自动跳过载入。
请至少配置空插件项(如下图所示)
[!IMPORTANT] 缺少anipusher__emby_host或anipusher__emby_key会导致无法下载Emby服务器上的图片,其他渠道图片依旧可用
缺少anipusher__tmdb_authorization时,插件将无法验证TMDB ID,导致数据无法存入综合数据库并且无法使用订阅命令。
缺少anipusher__proxy时,插件会在初始化时尝试直连TMDB,如果连接测试失败,TMDB相关功能也会关闭。
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
| anipusher__emby_host | 否 | 无 | Emby的服务器地址(请勿填写中转地址) |
| anipusher__emby_key | 否 | 无 | Emby服务器-高级-API密钥中生成的密钥 |
| anipusher__tmdb_authorization | 否 | 无 | TMDB用户的API token |
| anipusher__proxy | 否 | 无 | TMDB代理,如不填写则不使用代理 |
🎉 使用
指令表
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|---|---|---|---|---|
| 启用EMBY推送 | ALL | 否 | 私聊/群聊 | 群聊:发送指令后即将群组添加到Emby更新消息推送列表中,有新消息时将消息推送到群内 私聊:发送指令后即将用户添加到Emby更新消息推送列表中 |
| 启用AniRSS推送 | ALL | 否 | 私聊/群聊 | 群聊:发送指令后即将群组添加到AniRSS更新消息推送列表中,有新消息时将消息推送到群内 私聊:发送指令后即将用户添加到AniRSS更新消息推送列表中 |
| 取消EMBY推送 | ALL | 否 | 私聊/群聊 | 群聊:发送指令后关闭群组更新消息推送,不再接收推送 私聊:发送指令后关闭用户更新消息推送,不再接收推送 |
| 取消AniRSS推送 | ALL | 否 | 私聊/群聊 | 群聊:发送指令后关闭群组更新消息推送,不再接收推送 私聊:发送指令后关闭用户更新消息推送,不再接收推送 |
| 屏蔽推送 | ALL | 否 | 私聊/群聊 | 任何范围用户发送命令后,推送服务将被暂停,但记录服务仍在运行,使用重启推送命令后重启 |
| 重启推送 | ALL | 否 | 私聊/群聊 | 任何范围用户发送命令后,插件会重载推送对象,重启推送服务 |
| 订阅/取消订阅 | ALL | 否 | 私聊/群聊 | 群聊:使用订阅/取消订阅命令后在群组推送时会@您,私聊:程序只会在EMBY/ANISS推送功能开启时推送您订阅的番剧更新信息,没有订阅的则不会推送 |
订阅功能演示
支持带参数的订阅与对话式订阅,对话超时时间为60秒,如查询到多个结果会自动发送给用户选择,用户输入序号即可订阅,输入错误可重试次数为:5次
演示效果如下图所示
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_anipusher-0.5.4.tar.gz.
File metadata
- Download URL: nonebot_plugin_anipusher-0.5.4.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ba236e1574592fe926575d1a973afc9936687118460c8c21a6d82d2b42b337e
|
|
| MD5 |
a0e73695177f73d0afb08d23ed1fe5c8
|
|
| BLAKE2b-256 |
d831ffff3c58cbdedeeeaaf650c7a8c07bf63c233ec21b7b3fbcbeb12af87c3a
|
Provenance
The following attestation bundles were made for nonebot_plugin_anipusher-0.5.4.tar.gz:
Publisher:
pypi-publish.yml on AriadusTT/nonebot-plugin-anipusher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nonebot_plugin_anipusher-0.5.4.tar.gz -
Subject digest:
5ba236e1574592fe926575d1a973afc9936687118460c8c21a6d82d2b42b337e - Sigstore transparency entry: 1238885987
- Sigstore integration time:
-
Permalink:
AriadusTT/nonebot-plugin-anipusher@2874e7d6fd24e2d199872cf911103e9761f5c384 -
Branch / Tag:
refs/tags/v0.5.4 - Owner: https://github.com/AriadusTT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@2874e7d6fd24e2d199872cf911103e9761f5c384 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nonebot_plugin_anipusher-0.5.4-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_anipusher-0.5.4-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42e65ef8cf2994cf14327734594c3ff62fb9032720420d2b05a6b33f0d5ac53b
|
|
| MD5 |
b128ab7ac4a654340b4f166a1ecf9010
|
|
| BLAKE2b-256 |
64b2e808aad84ff0a9919f7d7d38096bc0066caa66d0cd09656f088c39fb53f7
|
Provenance
The following attestation bundles were made for nonebot_plugin_anipusher-0.5.4-py3-none-any.whl:
Publisher:
pypi-publish.yml on AriadusTT/nonebot-plugin-anipusher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nonebot_plugin_anipusher-0.5.4-py3-none-any.whl -
Subject digest:
42e65ef8cf2994cf14327734594c3ff62fb9032720420d2b05a6b33f0d5ac53b - Sigstore transparency entry: 1238886057
- Sigstore integration time:
-
Permalink:
AriadusTT/nonebot-plugin-anipusher@2874e7d6fd24e2d199872cf911103e9761f5c384 -
Branch / Tag:
refs/tags/v0.5.4 - Owner: https://github.com/AriadusTT
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@2874e7d6fd24e2d199872cf911103e9761f5c384 -
Trigger Event:
release
-
Statement type: