微算力 · API 导航与自营网关
API 接入 EN
未登录登录
✨

wps-ocr

wps-ocr · v1.0.1
安全 unknown 级 作者 randyliu111 公开目录收录
952 下载 3 安装 3.6k 收藏 2 浏览

简介

wps-ocr

原始描述

A lightweight, high-performance file parsing tool that can quickly and accurately extract text, handwritten text, formulas, tables, documents and seals from...

通过你的 Agent 添加

安装目录:wps-ocr/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/wps-ocr/
Codex CLI~/.codex/skills/wps-ocr/
DeepSeek Harness~/.agents/skills/wps-ocr/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


name: wps-ocr description: A lightweight, high-performance file parsing tool that can quickly and accurately extract text, handwritten text, formulas, tables, documents and seals from files into Markdown structure. It supports various common file scenarios such as scanned documents, screenshots and regular photos, and is compatible with multiple file formats including JPG, PNG, BMP, HEIF and WEBP, making it an efficient tool for text digitization.

metadata: clawdbot: emoji: "🔍" requires: pip: - requests required_env_vars: - WPS_OCR_ACCESS_KEY allowed_domains: - aiwrite.wps.cn security_notes: "Requires WPS OCR credentials via environment variables. No credential hardcoding. Enforces domain allowlist in code."

🧭 Must-Read Before Use (30 Seconds)

[!WARNING] ⚠️ Important Privacy & Data Flow Notice

  • Service Interaction Required: This skill will send the file you provide to the official Kingsoft Office server (aiwrite.wps.cn) for recognition.
  • Data Visibility: Kingsoft Office services will access and process the content of your file.
  • This skill supports local file uploads, and will only verify the file type without performing any verification on the path.

✅ Recommended Method: Environment Variables (Permission-Free, Instant Effect, Webchat-Friendly)

# Run in the terminal (effective immediately for the current session):
export WPS_OCR_ACCESS_KEY="your_client_access_key"
# Append the credential to the ~/.openclaw/env file
echo 'export WPS_OCR_ACCESS_KEY="your_client_access_key"' >> ~/.openclaw/env

[!TIP] 🔧 How to obtain the key?

✅ Environment Dependency Check Make sure the required libraries are installed:

pip install requests

🎯 Skill Execution Guide

1. Applicable Scenarios

Invoke this skill when the user’s intent includes any of the following:

  • Sends a file and asks “What text is this?”, “Extract text”, or “Convert to text”.
  • Uploads document screenshots, invoices, business cards, photos, or scanned files with mixed Chinese and English text to be recognized.
  • Needs to translate or edit the file content (text extraction is a required first step).

2. Execution Actions

Once it is confirmed that text extraction is required, perform the following operations immediately: Input Processing: Obtain the file resource provided by the user (using a download link: url or a local file: path). Command Execution: Call the Python script for recognition. If the current environment supports command-line execution, construct the command as follows:

# use file download URL:
python3 skills/wps-ocr/scripts/wps_ocr.py --url <URL>
# use local file:
python3 skills/wps-ocr/scripts/wps_ocr.py --path <LOCAL-PATH>

Execution Flow

1. File Acquisition

The file will be sent to Kingsoft Office Cloud Service, which will download the file provided by the user.

2. File Validation

Verify that the file is in a supported format.

3. Recognize File Content

Identify elements such as text, images, tables, formulas, and other content in the file, and extract the text. ⚠️ Note: Image elements will be returned as placeholders; file elements will not be returned.

4. Return Results to the User

On success: Return all recognized text (concatenated into one string) and detailed detection information. On failure: Return error messages (e.g., "No text detected in the file", "API call failed", etc.).

OCR API Usage Notes

This skill relies on the WPS-OCR parsing and recognition capabilities hosted on Kingsoft Cloud Service. The current version is a free trial. To ensure stable operation, the cloud service enforces rate limiting. The service will reject requests under high concurrency; please use it appropriately. To experience the full features, visit the demo platform.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

没有标签

同类 Skill