NoneBot 图像对称处理插件,提供图片上下左右四个方向的对称变换功能
Project description
📖 介绍
一个 NoneBot 2 插件,提供图像的四个方向对称变换功能:
- 对称左:将图片左半部分镜像翻转后覆盖到右半部分
- 对称右:将图片右半部分镜像翻转后覆盖到左半部分
- 对称上:将图片上半部分镜像翻转后覆盖到下半部分
- 对称下:将图片下半部分镜像翻转后覆盖到上半部分
💿 安装
此插件需要 httpx 驱动器下载图片,请在 DRIVER 变量中添加 ~httpx。
驱动器安装和配置参考 NoneBot 选择驱动器。
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-image-symmetry
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-image-symmetry
pdm
pdm add nonebot-plugin-image-symmetry
poetry
poetry add nonebot-plugin-image-symmetry
conda
conda install -c conda-forge nonebot-plugin-image-symmetry
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot_plugin_image_symmetry"]
⚙️ 配置
本插件现在开箱即用,无需配置。
缓存模式功能已在 0.3.0 版本中移除,插件现在始终以无缓存模式运行。在此模式下,图片不会被下载,而是直接在内存中处理。
请用户更新到新版本后,尽快移除原先的环境变量。
🎉 使用
注意:下列命令需要加命令前缀。命令前缀为你的 NoneBot2 环境配置中, COMMAND_START 变量的值。
指令表
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|---|---|---|---|---|
| 对称左 | 群员 | 否 | 群聊/私聊 | 将图片左半部分镜像到右半部分 |
| 对称右 | 群员 | 否 | 群聊/私聊 | 将图片右半部分镜像到左半部分 |
| 对称上 | 群员 | 否 | 群聊/私聊 | 将图片上半部分镜像到下半部分 |
| 对称下 | 群员 | 否 | 群聊/私聊 | 将图片下半部分镜像到上半部分 |
| 对称 | 群员 | 否 | 群聊/私聊 | 对称左的别名 |
| 对称帮助 | 群员 | 否 | 群聊/私聊 | 显示对称插件的帮助信息 |
使用方法
方法一:同时发送图片和指令
- 在聊天中同时发送一张图片和文本指令:
对称左、对称右、对称上或对称下 - 插件将根据指定的指令自动处理图片并返回结果
方法二:对图片消息回复指令
- 找到一条包含图片的消息
- 回复该消息并输入指令:
对称左、对称右、对称上或对称下 - 插件将根据指定的指令处理回复的图片并返回结果
注意:对称 是 对称左 的别名,使用 对称 指令将执行与 对称左 相同的操作
📝 许可证
本项目采用 Apache License 2.0 许可证。详见 LICENSE 文件。
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_image_symmetry-0.3.2.tar.gz.
File metadata
- Download URL: nonebot_plugin_image_symmetry-0.3.2.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2531205bc4089767e99ff62f7a866e3056451c842cb512bc08789691ca7cc763
|
|
| MD5 |
6a83b1baa8d48fc87c046691cea30bd9
|
|
| BLAKE2b-256 |
2a3e8528b62bb78a7b4d879f460485f1ee85ee597c5c1436373133aa9fa7b4be
|
Provenance
The following attestation bundles were made for nonebot_plugin_image_symmetry-0.3.2.tar.gz:
Publisher:
publish.yml on GT-610/nonebot-plugin-image-symmetry
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nonebot_plugin_image_symmetry-0.3.2.tar.gz -
Subject digest:
2531205bc4089767e99ff62f7a866e3056451c842cb512bc08789691ca7cc763 - Sigstore transparency entry: 1109776676
- Sigstore integration time:
-
Permalink:
GT-610/nonebot-plugin-image-symmetry@b0ef92fa06533bd5ca11c5f3954a999d0ba63a5e -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/GT-610
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b0ef92fa06533bd5ca11c5f3954a999d0ba63a5e -
Trigger Event:
push
-
Statement type:
File details
Details for the file nonebot_plugin_image_symmetry-0.3.2-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_image_symmetry-0.3.2-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d2000297f422686ac42738b91dc3e0036ed76e73631a92652bc5737974916c3
|
|
| MD5 |
6e8b5385c15891b515b92572edc2687a
|
|
| BLAKE2b-256 |
85aae6f39f790b11c5b8bac0002fd9506d027e68348b3e31cf9248e6c6deda75
|
Provenance
The following attestation bundles were made for nonebot_plugin_image_symmetry-0.3.2-py3-none-any.whl:
Publisher:
publish.yml on GT-610/nonebot-plugin-image-symmetry
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nonebot_plugin_image_symmetry-0.3.2-py3-none-any.whl -
Subject digest:
1d2000297f422686ac42738b91dc3e0036ed76e73631a92652bc5737974916c3 - Sigstore transparency entry: 1109776691
- Sigstore integration time:
-
Permalink:
GT-610/nonebot-plugin-image-symmetry@b0ef92fa06533bd5ca11c5f3954a999d0ba63a5e -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/GT-610
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b0ef92fa06533bd5ca11c5f3954a999d0ba63a5e -
Trigger Event:
push
-
Statement type: