Skip to main content

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

Reason this release was yanked:

请使用0.5.0以上版本

Project description

NoneBotPluginLogo

nonebot-plugin-AniPusher

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

license pypi python

📖 介绍

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

目前支持AniRSS和Emby推送

show

💿 安装

使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-anipusher
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令

🎉 插件启用和配置方法

🔓启用插件

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入

plugins = ["nonebot_plugin_AniPusher"]

⚙️ 插件配置

配置项位于 nonebot2 项目根目录下的 .env 文件内
所有配置项均为非必选项,但建议填写。配置项缺失会导致对应功能被关闭。

[!IMPORTANT] 首次运行前请确保如下插件配置项已配置,否则插件将无法正常运行!
在.env文件中写入如下4个配置项(示例效果如图),配置项内容请根据下方填写:
anipush__emby_host="Emby的服务器地址"
anipush__emby_apikey="Emby密钥"
anipush__tmdb_apikey="TMDBApiKey"
anipush__tmdb_proxy="TMDB代理地址"
env

配置项 必填 默认值 说明
anipush__emby_host Emby的服务器地址(请勿填写中转地址)
anipush__emby_apikey Emby服务器-高级-API密钥中生成的密钥
anipush__tmdb_apikey TMDB用户的ApiKey
anipush__tmdb_proxy TMDB代理,如不填写则不使用代理

[!IMPORTANT] 所有配置项均为非必填项,但建议填写。配置项缺失会导致对应功能被关闭。

⚙️ Webhook发送端配置

⚙️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目前只支持媒体库-新媒体已添加
其他选项根据自身需求更改

🎉 使用

指令表

指令 权限 需要@ 范围 说明
注册Emby推送 ALL ALL 群聊:将群组添加到Emby更新消息推送列表中有新消息时将消息推送到群内
私聊:发送指令后即将用户添加到Emby更新消息推送列表中
注册AniRSS推送 ALL ALL 群聊:将群组添加到AniRSS更新消息推送列表中有新消息时将消息推送到群内
私聊:发送指令后即将用户添加到AniRSS更新消息推送列表中
取消Emby推送 ALL ALL 群聊:发送指令后关闭群组更新消息推送,不再接收推送
私聊:发送指令后关闭用户更新消息推送,不再接收推送
取消AniRSS推送 ALL ALL 群聊:发送指令后关闭群组更新消息推送,不再接收推送
私聊:发送指令后关闭用户更新消息推送,不再接收推送
屏蔽推送 ALL ALL 在不关闭bot的情况下置空所有推送列表
新消息不再推送,恢复后也不会补推送
恢复推送 ALL ALL 恢复所有推送服务

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.2.3.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.2.3-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_anipusher-0.2.3.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nonebot_plugin_anipusher-0.2.3.tar.gz
Algorithm Hash digest
SHA256 c2e48ffc0c9064c8ff576c8c9ed5752be158940f92d1de8f9e0d55c759081ac4
MD5 049a699bab58f574cb41126f3aae67a9
BLAKE2b-256 8da94e2a0fc2f1855109130f172b741d925fd7838645c55e031b84d4a584b1e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_anipusher-0.2.3.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.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_anipusher-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c0b90637e9365f8252f8f3b0fb87c334ba386f79132846bb87b7f68b5792dc12
MD5 6b3bf06c61e4e5162f8331ea82af2d12
BLAKE2b-256 324fdd552a2a5e9e223cdaa29244f088b4477fa15cfc7ca8fe9abfa7f043f49a

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_anipusher-0.2.3-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