Search

PythonReactSEOPDF
OpenClaw

Document Parser

document parser

ankylala0 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install ankylala/document-parser

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

document-parser

高精度文档解析技能,从 PDF、图片、Word 文档中提取结构化数据。

用途

  • 解析 PDF、图片 (JPG/PNG)、Word 文档
  • 版面分析与结构提取
  • 表格识别(输出 HTML/Markdown)
  • OCR 文字识别
  • 印章检测
  • 目录提取

命令

解析文档
document-parser parse <文件路径> [选项]

示例:

document-parser parse C:\docs\report.pdf
document-parser parse C:\docs\scan.jpg --layout --table
document-parser parse C:\docs\contract.docx --output markdown
查询任务状态
document-parser status <任务 ID>

参数说明

参数 说明 示例
文件路径 PDF/图片/Word 文件路径 C:\docs\report.pdf
--layout 启用版面分析 --layout
--table 启用表格识别 --table
--seal 启用印章检测 --seal
--output 输出格式 (json/markdown/both) --output markdown
--pages 页码范围 --pages 1-5,8,10-12

配置

方式一:环境变量
DOCUMENT_PARSER_API_KEY=your_api_key
DOCUMENT_PARSER_BASE_URL=http://47.111.146.164:8088/taidp/v1/idp/general_parse
方式二:配置文件

在技能目录创建 config.json:

{
  "api_key": "your_api_key",
  "base_url": "http://47.111.146.164:8088/taidp/v1/idp/general_parse"
}

输出格式

返回结构化 JSON 包含:

  • pages: 解析后的页面数组
  • elements: 版面元素(文本、表格、图片等)
  • markdown: Markdown 格式文本
  • data: 数据统计摘要

依赖

  • requests
  • python-docx (Word 支持)
  • Pillow (图片处理)

错误码

错误码 消息 说明
10000 Success 识别成功
10001 Missing parameter 参数缺失
10002 Invalid parameter 非法参数
10003 Invalid file 文件格式非法
10004 Failed to recognize 识别失败
10005 Internal error 内部错误

Source information

Source
github
Repository
openclaw/skills
Path
skills/ankylala/document-parser
Version
—
Commit
e757401241c1a9393c56161dd2e6e7eda06937b5
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

README

Document Parser

OpenClaw Skill - High-precision document parsing

Extract structured data from PDF, images, and Word documents.

Features

  • ✅ Multi-format Support: PDF, Images (JPG/PNG), Word documents
  • ✅ Layout Analysis: Automatically detect and structure document elements
  • ✅ Table Recognition: Extract tables with HTML and Markdown outputs
  • ✅ OCR Support: Recognize text in scanned documents and images
  • ✅ Seal Detection: Detect stamps and seals in documents
  • ✅ TOC Extraction: Extract table of contents from documents
  • ✅ Cross-page Merge: Automatically merge content across pages

Quick Start

Installation
# Install via ClawHub
openclaw skills install document-parser

# Or manual installation (local development)
cd E:\skills\document-parser
pip install -r requirements.txt
Configuration

Option 1: Environment Variables (Recommended)

# Windows PowerShell
$env:DOCUMENT_PARSER_API_KEY="your_api_key"
setx DOCUMENT_PARSER_API_KEY "your_api_key"

# Optional: Custom API endpoint
$env:DOCUMENT_PARSER_BASE_URL="http://your-server:8088/taidp/v1/idp/general_parse"

Option 2: Configuration File

cd E:\skills\document-parser
copy config.example.json config.json
# Edit config.json with your API Key
Usage
Parse a Document
# Basic parsing
document-parser parse "C:\docs\report.pdf"

# Enable layout analysis and table recognition
document-parser parse "C:\docs\report.pdf" --layout --table

# Specify output format
document-parser parse "C:\docs\scan.jpg" --output markdown

# Specify page range
document-parser parse "C:\docs\book.pdf" --pages 1-5,10-15
Query Task Status
document-parser status <task_id>

Parameters

Parameter Type Required Description
file string Yes PDF/Image/Word file path
--layout flag No Enable layout analysis
--table flag No Enable table r...

Extracted content

SKILL.md
# document-parser

高精度文档解析技能,从 PDF、图片、Word 文档中提取结构化数据。

## 用途
- 解析 PDF、图片 (JPG/PNG)、Word 文档
- 版面分析与结构提取
- 表格识别(输出 HTML/Markdown)
- OCR 文字识别
- 印章检测
- 目录提取

## 命令

### 解析文档
```
document-parser parse <文件路径> [选项]
```

示例:
```
document-parser parse C:\docs\report.pdf
document-parser parse C:\docs\scan.jpg --layout --table
document-parser parse C:\docs\contract.docx --output markdown
```

### 查询任务状态
```
document-parser status <任务 ID>
```

## 参数说明

| 参数 | 说明 | 示例 |
|------|------|------|
| 文件路径 | PDF/图片/Word 文件路径 | `C:\docs\report.pdf` |
| --layout | 启用版面分析 | `--layout` |
| --table | 启用表格识别 | `--table` |
| --seal | 启用印章检测 | `--seal` |
| --output | 输出格式 (json/markdown/both) | `--output markdown` |
| --pages | 页码范围 | `--pages 1-5,8,10-12` |

## 配置

### 方式一:环境变量
```
DOCUMENT_PARSER_API_KEY=your_api_key
DOCUMENT_PARSER_BASE_URL=http://47.111.146.164:8088/taidp/v1/idp/general_parse
```

### 方式二:配置文件
在技能目录创建 `config.json`:
```json
{
  "api_key": "your_api_key",
  "base_url": "http://47.111.146.164:8088/taidp/v1/idp/general_parse"
}
```

## 输出格式

返回结构化 JSON 包含:
- **pages**: 解析后的页面数组
- **elements**: 版面元素(文本、表格、图片等)
- **markdown**: Markdown 格式文本
- **data**: 数据统计摘要

## 依赖
- requests
- python-docx (Word 支持)
- Pillow (图片处理)

## 错误码

| 错误码 | 消息 | 说明 |
|--------|------|------|
| 10000 | Success | 识别成功 |
| 10001 | Missing parameter | 参数缺失 |
| 10002 | Invalid parameter | 非法参数 |
| 10003 | Invalid file | 文件格式非法 |
| 10004 | Failed to recognize | 识别失败 |
| 10005 | Internal error | 内部错误 |
README
# Document Parser

> OpenClaw Skill - High-precision document parsing

Extract structured data from PDF, images, and Word documents.

## Features

- ✅ **Multi-format Support**: PDF, Images (JPG/PNG), Word documents
- ✅ **Layout Analysis**: Automatically detect and structure document elements
- ✅ **Table Recognition**: Extract tables with HTML and Markdown outputs
- ✅ **OCR Support**: Recognize text in scanned documents and images
- ✅ **Seal Detection**: Detect stamps and seals in documents
- ✅ **TOC Extraction**: Extract table of contents from documents
- ✅ **Cross-page Merge**: Automatically merge content across pages

## Quick Start

### Installation

```bash
# Install via ClawHub
openclaw skills install document-parser

# Or manual installation (local development)
cd E:\skills\document-parser
pip install -r requirements.txt
```

### Configuration

**Option 1: Environment Variables (Recommended)**
```bash
# Windows PowerShell
$env:DOCUMENT_PARSER_API_KEY="your_api_key"
setx DOCUMENT_PARSER_API_KEY "your_api_key"

# Optional: Custom API endpoint
$env:DOCUMENT_PARSER_BASE_URL="http://your-server:8088/taidp/v1/idp/general_parse"
```

**Option 2: Configuration File**
```bash
cd E:\skills\document-parser
copy config.example.json config.json
# Edit config.json with your API Key
```

### Usage

#### Parse a Document
```bash
# Basic parsing
document-parser parse "C:\docs\report.pdf"

# Enable layout analysis and table recognition
document-parser parse "C:\docs\report.pdf" --layout --table

# Specify output format
document-parser parse "C:\docs\scan.jpg" --output markdown

# Specify page range
document-parser parse "C:\docs\book.pdf" --pages 1-5,10-15
```

#### Query Task Status
```bash
document-parser status <task_id>
```

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| file | string | Yes | PDF/Image/Word file path |
| --layout | flag | No | Enable layout analysis |
| --table | flag | No | Enable table r...

Related skills

OpenClaw

dojo.md

edholofy

University for AI agents. 92 courses, 4400+ scenarios, any model via OpenRouter. Auto-training loops generate per-model SKILL.md documents. Works with Claude Code, OpenClaw, Cursor, Windsurf. No fine-tuning req...

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...

OpenClaw

wps-macos-helper

lethehades

macOS WPS Office workflow helper skill for safer document preparation, conversion, export, and compatibility guidance