Skip to main content

OCR plugin for nonebot2

Project description

nonebot-plugin-ocr

基于 NoneBot2 的文字识别插件

Python Compatability PyPI version GitHub version

NoneBot 适配器支持

OCR 应用支持

部署指南

一. 安装插件

  • 方式一:使用 pip

    1.安装 nonebot-plugin-ocr

    pip install nonebot-plugin-ocr
    

    2.使用 nonebot 加载插件 "nonebot_plugin_ocr" (参考:加载插件

  • 方式二:手动安装

    1.克隆本仓库

    git clone https://github.com/NewYearPrism/nonebot-plugin-ocr
    

    2.安装依赖 requirements.txt

    pip install -r requirements.txt
    

    3.复制插件本体到 Nonebot 环境中

    cp path/to/repo/nonebot-plugin-ocr/nonebot_plugin_ocr path/to/nonebot_plugins -r
    

    4.使用 nonebot 加载插件(同上)

二. 创建配置文件

  • 需要手动创建配置文件,配置文件默认路径 ".ocr/config.toml" (相对当前工作目录), 你可以在 NoneBot .env配置中使用变量OCR_CONFIG_PATH指定之:

    # .env
    HOST=0.0.0.0
    PORT=8080
    SUPERUSERS=["123456789", "987654321"]
    # ...
    OCR_CONFIG_PATH="path/to/config/ocr.toml"

    mkdir -p path/to/config
    vim path/to/config/ocr.toml 
    
  • 具体参考:配置模板配置文档

使用方法

特别感谢

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-ocr-0.3.2.tar.gz (7.6 kB view hashes)

Uploaded Source

Built Distribution

nonebot_plugin_ocr-0.3.2-py3-none-any.whl (9.3 kB view hashes)

Uploaded Python 3

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