为nonebot机器人发送的图片加上水印
Project description
📖简介
为bot发出的所有图片都加上水印(有的时候水印很烦,但是帅气的水印能增加图片的美感,不是吗?)
💿安装方法
nb脚手架
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot_piugin_watermarker
pip
pip安装
命令行输入以下命令
pip install nonebot_plugin_watermarker
打开 nonebot2 项目根目录下的 pyproject.toml
文件, 在 [tool.nonebot]
部分追加写入
plugins = ["nonebot_plugin_rename"]
[tool.nonebot]
plugins = []
plugin_dirs = ["src/plugins"]
⚙插件配置项
变量名 | 变量类型 | 变量概述 |
---|---|---|
watermark_image_path |
str |
水印图片存放目录,目录下的所有水印图片会被随机选取 |
watermark_image_size |
float |
水印相对图片的大小(保持水印原来的形状) |
watermark_image_exculed_plugin |
List[str] |
不想被贴水印的插件(未完工) |
🎉目前已实现的功能
加水印捏
效果图
太小了看不见放大看(
💡待实现的功能
- -[ ] 对特定的插件的图片不进行贴水印操作
- -[ ] 待补充.....
💣已知bug
水印小概率贴不上,应该是base64的原因,但是我一直找不到真正的问题源,因为有时候贴的上有时候贴不上(
🔥鸣谢
Nonebot2,不用说,没有Nonebot就没有这个插件
我自己,因为我做的PoweredByNonebot的Logo
💦其他
没有其他,想到再补
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
Close
Hashes for nonebot_plugin_watermarker-0.1.5.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53e7d3d202bc9b9c4e4841be197af12cd5a09dff6a9865ece035486a28ca18b5 |
|
MD5 | f832988cab0b2b5efbf6cdcd05b5332b |
|
BLAKE2b-256 | 721f6b0f96981d1e2011ebb3be1d7b5e1bf0bb373a4fe34c1c1c1e08529c442f |