TERMINAL
clawhub install screenshot-ocr📖 About This Skill
name: screenshot-ocr version: 1.0.0 description: 截图 OCR 识别工具。截图→自动识别文字→复制/保存,适合提取图片内容、表格数据、验证码。 author: 你的名字 triggers: - "截图识别" - "OCR" - "图片转文字" - "截图文字" - "屏幕识别"
Screenshot OCR 📷
截图自动识别文字,支持中文、英文、数字。
功能
使用方法
识别剪贴板图片
python3 scripts/ocr.py clipboard
识别图片文件
python3 scripts/ocr.py file screenshot.png
识别并保存
python3 scripts/ocr.py file screenshot.png --save result.txt
识别并复制
python3 scripts/ocr.py file screenshot.png --copy
依赖安装
# 安装 Tesseract(Linux)
sudo apt install tesseract-ocr tesseract-ocr-chi-simmacOS
brew install tesseractWindows
下载安装 https://github.com/UB-Mannheim/tesseract/wiki
示例
# 识别截图
python3 scripts/ocr.py clipboard识别图片并复制
python3 scripts/ocr.py file ~/Desktop/1.png --copy
环境要求
pip install pytesseract pillow