ocr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseIMPORTANT - Path Resolution:
This skill can be installed in different locations (plugin system, manual installation, global, or project-specific). Before executing any commands, determine the skill directory based on where you loaded this SKILL.md file, and use that path in all commands below. Replace with the actual discovered path.
$SKILL_DIR重要提示 - 路径解析:
该Skill可安装在不同位置(插件系统、手动安装、全局或项目专属)。在执行任何命令之前,请根据加载此SKILL.md文件的位置确定Skill目录,并在以下所有命令中使用该路径。将替换为实际找到的路径。
$SKILL_DIROCR
OCR
Run the OCR CLI directly via Node.js:
通过Node.js直接运行OCR CLI:
Setup (First Time)
首次设置
bash
cd $SKILL_DIR/scripts
npm run setupbash
cd $SKILL_DIR/scripts
npm run setupExecution Pattern
执行方式
bash
cd $SKILL_DIR/scriptsbash
cd $SKILL_DIR/scriptsOCR from file
从文件提取OCR文本
node cli.js <image-path>
node cli.js <image-path>
OCR from file with language
指定语言从文件提取OCR文本
node cli.js <image-path> --lang <lang>
node cli.js <image-path> --lang <lang>
OCR from clipboard (macOS)
从剪贴板提取OCR文本(macOS)
node cli.js --clipboard
node cli.js --clipboard
OCR from clipboard with language
指定语言从剪贴板提取OCR文本
node cli.js --clipboard --lang <lang>
undefinednode cli.js --clipboard --lang <lang>
undefinedExamples
示例
bash
cd $SKILL_DIR
node cli.js ./screenshot.png
node cli.js /path/to/image.jpg --lang chi_tra
node cli.js --clipboard --lang jpnbash
cd $SKILL_DIR
node cli.js ./screenshot.png
node cli.js /path/to/image.jpg --lang chi_tra
node cli.js --clipboard --lang jpnSupported Languages
支持的语言
- - English
eng - - Simplified Chinese
chi_sim - - Traditional Chinese
chi_tra - - Japanese
jpn - - Korean
kor - Combine with :
+eng+chi_sim+jpn
- - 英文
eng - - 简体中文
chi_sim - - 繁体中文
chi_tra - - 日文
jpn - - 韩文
kor - 使用组合多种语言:
+eng+chi_sim+jpn
Supported Formats
支持的格式
PNG, JPG, JPEG, GIF, BMP, WebP, TIFF
PNG, JPG, JPEG, GIF, BMP, WebP, TIFF