ocr

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
IMPORTANT - 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
$SKILL_DIR
with the actual discovered path.
重要提示 - 路径解析: 该Skill可安装在不同位置(插件系统、手动安装、全局或项目专属)。在执行任何命令之前,请根据加载此SKILL.md文件的位置确定Skill目录,并在以下所有命令中使用该路径。将
$SKILL_DIR
替换为实际找到的路径。

OCR

OCR

Run the OCR CLI directly via Node.js:
通过Node.js直接运行OCR CLI:

Setup (First Time)

首次设置

bash
cd $SKILL_DIR/scripts
npm run setup
bash
cd $SKILL_DIR/scripts
npm run setup

Execution Pattern

执行方式

bash
cd $SKILL_DIR/scripts
bash
cd $SKILL_DIR/scripts

OCR 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>
undefined
node cli.js --clipboard --lang <lang>
undefined

Examples

示例

bash
cd $SKILL_DIR

node cli.js ./screenshot.png
node cli.js /path/to/image.jpg --lang chi_tra
node cli.js --clipboard --lang jpn
bash
cd $SKILL_DIR

node cli.js ./screenshot.png
node cli.js /path/to/image.jpg --lang chi_tra
node cli.js --clipboard --lang jpn

Supported Languages

支持的语言

  • eng
    - English
  • chi_sim
    - Simplified Chinese
  • chi_tra
    - Traditional Chinese
  • jpn
    - Japanese
  • kor
    - Korean
  • 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