Skip to main content

解析二维码

Project description

NoneBotPluginLogo
NoneBotPluginText

nonebot-plugin-qrcode2

✨ 解析二维码 ✨

license pypi python

日志

新增通过opencv下腾讯的二维码识别模型识别。 v0.2.0 2023/09/12

依赖

根据pyzbar官方文档,zbar DLLs 已经包含在 Windows Python 轮子中。

在其他操作系统上,您需要安装 zbar 共享库。

Mac OS X:

brew install zbar

Linux:

sudo apt-get install libzbar0

💿 安装

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

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

plugins = ["nonebot-plugin-qrcode2"]

🎉 使用

默认配置下

命令: {#} {扫码}

说明:命令符不是命令头,只要包含命令符和命令关键字就会触发响应,例如“foo扫码foo # foo”也可以触发

附带一张图片、或回复一张图片、或再发送一张图片

可以自定义命令符、命令关键字

示例:

image image image

⚙️ 配置

如果需要自定义配置,请在 nonebot2 项目的.env文件中添加配置

配置项 必填 默认值 说明
qrcode_cmd "#" 命令符
qrcode_keyword ["扫码"] 命令关键字
qrcode_priority 10 响应优先级
nickname ["qrcode2"] bot昵称列表,只取nickname[0]

感谢

使用的二维码解析库(按调用顺序排序)

  • opencv-contrib-python 腾讯的wechat_qrcode_WeChatQRCode
  • pyzbar

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_qrcode2-0.2.2.tar.gz (926.3 kB view details)

Uploaded Source

Built Distribution

nonebot_plugin_qrcode2-0.2.2-py3-none-any.whl (926.6 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_qrcode2-0.2.2.tar.gz.

File metadata

  • Download URL: nonebot_plugin_qrcode2-0.2.2.tar.gz
  • Upload date:
  • Size: 926.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.1 Windows/10

File hashes

Hashes for nonebot_plugin_qrcode2-0.2.2.tar.gz
Algorithm Hash digest
SHA256 2a27e5f086ae9718704ef186eda469b7285426574709c066f4b45f975afb5143
MD5 d3773a4c63d548e3b66b0bf5fb7bd471
BLAKE2b-256 b48adb82bdd6180304cd4237a46bb175f41a09b33c7f1dbddafc1fa37a2314fc

See more details on using hashes here.

File details

Details for the file nonebot_plugin_qrcode2-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_qrcode2-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 07729456ef424eb966f8d4c421b9ea8e9e949373c6e19652308fb5c3a52fe098
MD5 32f5a9f0631d8d325254291155bb3d30
BLAKE2b-256 ca505604d293078fe85dccb59c910174bbd0b17cb464f786e2aacccae7d47c62

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page