Skip to main content

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

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-image-symmetry

✨ NoneBot 图像对称插件 ✨

license pypi python NoneBot2 Publish to PyPI

📖 介绍

一个 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.4.0.tar.gz (12.2 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.4.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_image_symmetry-0.4.0.tar.gz
Algorithm Hash digest
SHA256 4f7c0ea5fe5ceb1478a40c8e97fc9baa8b5bc40277d5af0a428a73b7d81c49b0
MD5 5cedf194b3a5640e03b524d667a4b504
BLAKE2b-256 810371a0530b5150bf14fdd7fc649396688c0e73c5ac8ad34e15b0a8fc2be95d

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_image_symmetry-0.4.0.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.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_image_symmetry-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5bb39c4739d961dcbcdf6aebcc8d729ddd68c1a0ae535f11710fd434397eafc
MD5 bef40ad6737a3433219b1e3eca1ad096
BLAKE2b-256 1cce08496d420808eb0f048a781aff4a458ceb63aeaf349dd760a87c7ac9750e

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_image_symmetry-0.4.0-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