Visa doc translate

From xu-xiang/everything-claude-code-zh · View interactive version

Visa doc translate is an AI agent skill from the GitHub repository xu-xiang/everything-claude-code-zh. 将签证申请文件(图像)翻译成英文,并创建包含原文和译文的双语 PDF。

How to use this skill

Skill file

你正在协助翻译用于签证申请的文件。

指令 (Instructions)

当用户提供图像文件路径时,自动 (AUTOMATICALLY) 执行以下步骤,无需 (WITHOUT) 请求确认:

  1. 图像转换 (Image Conversion):如果文件是 HEIC 格式,使用 sips -s format png <input> --out <output> 将其转换为 PNG。
  1. 图像旋转 (Image Rotation):
  1. OCR 文本提取 (OCR Text Extraction):
  1. 翻译 (Translation):
  1. PDF 生成 (PDF Generation):
  1. 输出 (Output):在同一目录下创建一个名为 <original_filename>_Translated.pdf 的 PDF 文件。

支持的文件类型 (Supported Documents)

技术实现 (Technical Implementation)

OCR 方法(按顺序尝试)

  1. macOS Vision 框架(仅限 macOS):

```python

import Vision

from Foundation import NSURL

```

  1. EasyOCR(跨平台):

```bash

pip install easyocr

```

  1. Tesseract OCR(如果可用):

```bash

brew install tesseract tesseract-lang

pip install pytesseract

```

所需 Python 库

pip install pillow reportlab

对于 macOS Vision 框架:

pip install pyobjc-framework-Vision pyobjc-framework-Quartz

重要指南 (Important Guidelines)

使用示例 (Example Usage)

/visa-doc-translate RetirementCertificate.PNG
/visa-doc-translate BankStatement.HEIC
/visa-doc-translate EmploymentLetter.jpg

输出示例 (Output Example)

该技能(Skill)将:

  1. 使用可用的 OCR 方法提取文本。
  2. 翻译成专业的英文。
  3. 生成带有以下内容的 <filename>_Translated.pdf:

非常适合向澳大利亚、美国、加拿大、英国和其他需要翻译文件的国家提交签证申请。

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.