Skip to main content

NoneBot 图像对称处理插件,提供图片上下左右四个方向的对称变换功能

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-image-symmetry

✨ NoneBot 图像对称插件 ✨

license pypi python NoneBot2

📖 介绍

一个 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 变量的值。

指令表

指令 权限 需要@ 范围 说明
对称左 群员 群聊/私聊 将图片左半部分镜像到右半部分
对称右 群员 群聊/私聊 将图片右半部分镜像到左半部分
对称上 群员 群聊/私聊 将图片上半部分镜像到下半部分
对称下 群员 群聊/私聊 将图片下半部分镜像到上半部分
对称 群员 群聊/私聊 对称左的别名
对称帮助 群员 群聊/私聊 显示对称插件的帮助信息

使用方法

方法一:同时发送图片和指令

  1. 在聊天中同时发送一张图片和文本指令:对称左对称右对称上对称下
  2. 插件将根据指定的指令自动处理图片并返回结果

方法二:对图片消息回复指令

  1. 找到一条包含图片的消息
  2. 回复该消息并输入指令:对称左对称右对称上对称下
  3. 插件将根据指定的指令处理回复的图片并返回结果

注意对称对称左 的别名,使用 对称 指令将执行与 对称左 相同的操作

📝 许可证

本项目采用 Apache License 2.0 许可证。详见 LICENSE 文件。

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_image_symmetry-0.3.1.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

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

nonebot_plugin_image_symmetry-0.3.1-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_image_symmetry-0.3.1.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_image_symmetry-0.3.1.tar.gz
Algorithm Hash digest
SHA256 d487967e041d9fe9d7112454114b1ee5f1de79c7dcaef70379c1fd05f1b6e35b
MD5 f9b1e9c3b40857fd777268218c9e8b75
BLAKE2b-256 c811faed86171072fb9ef1d0bfd27ebf7ab730a1f7a378788a762dbaf3758cfe

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_image_symmetry-0.3.1.tar.gz:

Publisher: publish.yml on GT-610/nonebot-plugin-image-symmetry

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_image_symmetry-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_image_symmetry-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5cc73811ac63933e2d0ab05bf0641cedcd00fc139784fe3378558fe9ec87c1d4
MD5 ec2a5de62b5edfd41e9162e44b6d0db2
BLAKE2b-256 53d9ac655aa00b8af9c67928c91c1970b571ff793bfe65992c7dd20b61bafdf5

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_image_symmetry-0.3.1-py3-none-any.whl:

Publisher: publish.yml on GT-610/nonebot-plugin-image-symmetry

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