闲社服务运行正常AI智能体自动化平台
d

文档OCR技能

技能标识:doc-ocr-skills

OCR documents (PDFs and images) using Gemini 2.5 Flash, PaddleOCR (local), or RapidOCR (local).

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 0.1.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

文档OCR技能

技能名称: doc-ocr-skills
详细描述:

文档OCR技能 (docr)

使用 Gemini 2.5 Flash、PaddleOCR 或 RapidOCR(本地)从扫描的PDF和图片中识别文本。编译为单个Go二进制文件。

前置条件

  • - 在 ~/.ocr/config 中配置API密钥(Paddle/Rapid无需)
  • 对于RapidOCR引擎:pip install rapidocr_onnxruntime
  • 对于PaddleOCR引擎:pip install paddleocr paddlepaddle

API密钥配置

创建配置文件:

bash
mkdir -p ~/.ocr
cat > ~/.ocr/config << EOF

Google Gemini API密钥


geminiapikey=yourgeminikey
EOF

快速开始

路径变量:以下所有命令均使用 $DOCR。运行任何命令前,请先设置此变量:
bash
SKILL_DIR=$(cd $(dirname ) && pwd)
DOCR=$SKILL_DIR/scripts/docr/docr

bash

使用RapidOCR(默认)识别单个文档

$DOCR document.pdf $DOCR image.jpg

使用Gemini引擎

$DOCR -engine gemini document.pdf

使用PaddleOCR本地引擎

$DOCR -engine paddle document.pdf

指定输出文件

$DOCR document.pdf -o result.txt

批量处理目录中所有支持的文件

$DOCR -batch ./docs/ -o ./outputs/

引擎

引擎标志API密钥配置文档处理
RapidOCR(默认)-engine rapid无本地OCR
Gemini
-engine gemini | geminiapikey | 云端视觉API | | PaddleOCR(本地) | -engine paddle | 无 | 本地OCR |

CLI参考

docr [选项] <文件或目录>

选项:
-engine string OCR引擎:rapid(默认)/ gemini / paddle
-e string 引擎(短标志)
-o string 输出文件路径或目录(批量模式)
-output string 输出路径(长标志)
-batch 批量模式:处理目录中的所有文件
-prompt string 自定义识别提示(gemini)

安装

我们提供预编译的二进制文件,方便您快速上手。

bash
cd doc-ocr-skills/scripts
./install.sh

此脚本将检测您的操作系统(darwin/linux)和架构(amd64/arm64),并下载相应版本的 docr。

从源码构建(可选)

如果您希望从源码构建,请确保已安装 Go 1.21+:

bash
cd doc-ocr-skills/scripts/docr
go build -o docr .

错误处理

错误解决方案
config file not found创建包含API密钥的 ~/.ocr/config
geminiapikey not found
在配置中添加 geminiapikey=VALUE | | file not found | 验证文档文件路径 | | API超时 | 重试;大文件可能需要更长时间 |

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 doc-ocr-skills-1776159903 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 doc-ocr-skills-1776159903 技能

通过命令行安装

skillhub install doc-ocr-skills-1776159903

下载

⬇ 下载 doc-ocr-skills v0.1.0(免费)

文件大小: 6.21 KB | 发布时间: 2026-4-15 13:54

v0.1.0 最新 2026-4-15 13:54
- Initial release of doc-ocr-skills: an OCR utility for scanned PDFs and images.
- Supports three OCR engines: Gemini 2.5 Flash (cloud), PaddleOCR (local), and RapidOCR (local, default).
- Simple CLI with commands for single/multiple documents, flexible engine selection, and output options.
- Requires minimal setup, with easy installation script and optional local Python dependencies.
- Provides clear error messages and troubleshooting steps.
返回顶部