Skip to main content

NoneBot plugin for pushing ani-rss/emby webhooks to QQ

Project description

NoneBotPluginLogo

nonebot-plugin-AniPusher

✨ NoneBot AniPusher插件 ✨
NoneBot AniPusher插件 是将特定Webhooks消息推送至QQ的插件
目前支持配置来自ani-rss和emby的webhooks消息

license pypi python

[!IMPORTANT] 重大更新,请务必查看新的配置方式与功能列表

📖 介绍

AniPusher插件 是将特定Webhook消息推送至QQ的插件

目前支持AniRSS和Emby推送

show

💿 安装

任选一种方式安装即可
安装完成后打开 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 → 设置 → 通知 → 添加通知
↓按如下配置↓
ani-rss-config

通知类型为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
按如下配置
embv-config

网址为Nonebot2的IP地址和端口下的路径/webhook
例如http://Nonebot_IP:8080/webhook
请求内容类型为application/json
Event目前只支持媒体库-新媒体已添加
其他选项根据自身需求更改

⚙️ 插件配置

配置项位于 nonebot2 项目根目录下的 .env 文件内
如果没有配置插件项插件会自动跳过载入。
请至少配置空插件项(如下图所示)
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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_anipusher-0.5.5.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_anipusher-0.5.5-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_anipusher-0.5.5.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_anipusher-0.5.5.tar.gz
Algorithm Hash digest
SHA256 311715b2828db6961091bf38dd4b8abb990b5fefb6d2917462c606bf5fcc2e34
MD5 0c4e8854e9e3ed624eb547f62b6aa68b
BLAKE2b-256 0f13628d4f050e716304520c4bb3e9711dd5dbe01161f440da98f3b29b6e98c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_anipusher-0.5.5.tar.gz:

Publisher: pypi-publish.yml on AriadusTT/nonebot-plugin-anipusher

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nonebot_plugin_anipusher-0.5.5-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_anipusher-0.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4d668fd20e67f859cee96eb89771c2c489c3348f1d369bf437f5ff4bd2d88669
MD5 3199cc2021143c81cb6dd869ee2e126d
BLAKE2b-256 e686dd877139d5c7a7240d6ee5f7aaf149a499df9922b26150a04a0d875de6b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_anipusher-0.5.5-py3-none-any.whl:

Publisher: pypi-publish.yml on AriadusTT/nonebot-plugin-anipusher

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page