Skip to main content

一个nonebot多api翻译姬

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-pictranslator

✨ NoneBot 插件简单描述 ✨

license pypi python

📖 介绍

一个基于Nonebot2的插件,提供多个api的文本及图片翻译功能,附带中英词典和ocr功能。
WIP

支持的api

词典功能

图文翻译

-[x] 腾讯 -[ ] 有道 WIP -[ ] 百度 WIP

💿 安装

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

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

plugins = ["nonebot_plugin_template"]

⚙️ 配置

在 nonebot2 项目的.env文件中添加下表中的必填配置

配置项 必填 默认值 说明
TIANAPI_KEY 天聚数行APIkey,用于中英词典查询
腾讯API相关 / / 详见文档
TENCENT_SECRET_ID 若使用则必填 腾讯API的secret_id
TENCENT_SECRET_KEY 若使用则必填 腾讯API的secret_key
ENABLE_TENCENT_API / 是否启用腾讯API,填写了上两项则默认启用
TENCENT_PROJECT_ID 0 腾讯API的project_id
TENCENT_API_REGION 腾讯API的secret_key
有道API相关 WIP
百度API相关 WIP

🎉 使用

指令表

指令 权限 需要@ 范围 说明
词典/查词 [单词] 群员 群聊 查询单词意思
(图片)翻译/[语言]译[语言] 群员 群聊 进行翻译,使用[语言]译[语言]来指定源语言和目标语言。在指令前添加图片可进行图片翻译
ocr 群员 群聊 进行图片文字提取

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_pictranslator-0.1.0.tar.gz (13.6 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_pictranslator-0.1.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_pictranslator-0.1.0.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_pictranslator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 57ebfb84ae27fa4c971e81524a19885f35ccf2e1fe5a04d3a81548ffcc396337
MD5 6162886e803d70cdcd7f8ec092571721
BLAKE2b-256 64538c1b5a8822c79a6b04f78dc595131d9a8918f9a73b35e6f88b38a9515d32

See more details on using hashes here.

File details

Details for the file nonebot_plugin_pictranslator-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_pictranslator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0083fe60787a1aba8b990b5362ecc9dea9446c1ed9bb12531ed2e469dd9b5f54
MD5 46a6ba7c7acb36b988be240d44bbb48e
BLAKE2b-256 dcf87465cb70fce4a85dea7411caa846d8be7ec266114244d75d52c7731c0a0e

See more details on using hashes here.

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