返回顶部
d

doc-process文档处理

>

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 4.1.1
安全检测
已通过
499
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

doc-process

文档处理 — 文档智能技能

第0步 — 自动设置(首次使用时运行一次)

在会话中首次调用任何脚本前,检查脚本依赖项是否可用。如果缺少任何依赖项,自动运行设置脚本 — 无需提示:

bash
bash skills/doc-process/setup.sh

这将安装所有Python包(pymupdf、Pillow、pytesseract、opencv-python-headless、numpy、img2pdf、pdfplumber、openai-whisper),并根据平台通过brew或apt尝试安装系统二进制文件(tesseract、ffmpeg)。

何时运行第0步:

  • - 会话中首次使用任何脚本辅助模式时
  • 执行clawhub install piyush-zinc/doc-process后
  • 脚本因ModuleNotFoundError或ImportError失败时

仅安装Python包(不安装系统包):
bash
bash skills/doc-process/setup.sh --light

或直接从技能的requirements文件安装:
bash
pip install -r skills/doc-process/requirements.txt

注意: openai-whisper在首次音频转录时下载其模型(约140 MB)— 而非安装时。


概述

本技能利用Claude原生的视觉/语言能力进行阅读和分析,并使用Python脚本进行文件输出操作,处理所有与文档相关的任务。大多数模式无需安装 — 只有文件输出脚本需要第三方库。



功能实现方式


功能实现方式外部库
OCR / 读取图像Claude内置视觉能力
MRZ解码(护照/身份证)
Claude视觉读取MRZ,应用ICAO算法 | 无 |
| PDF读取 | Claude读取PDF文本层或视觉读取 | 无 |
| 表单自动填写 | Claude读取表单字段,输出填写表格 | 无 |
| 合同分析 | Claude应用参考规则集 | 无 |
| 收据/发票扫描 | Claude读取图像或PDF | 无 |
| 银行对账单(PDF) | Claude读取PDF页面 | 无 |
| 银行对账单(CSV) | statement_parser.py — 纯标准库 | 无 |
| 费用记录 | expense_logger.py — 纯标准库 | 无 |
| 银行报告生成 | report_generator.py — 纯标准库 | 无 |
| 简历/CV解析 | Claude读取文档 | 无 |
| 医疗摘要生成 | Claude读取文档 | 无 |
| 法律编辑(显示) | Claude标记输出 | 无 |
| 法律编辑(文件输出) | redactor.py | pymupdf(PDF);Pillow + pytesseract(图像) |
| 会议纪要(文本/PDF) | Claude读取文档 | 无 |
| 翻译 | Claude的多语言能力 | 无 |
| 文档分类器 | Claude读取前1–2页(需用户同意) | 无 |
| 时间线记录 | timeline_manager.py — 纯标准库 | 无 |
| 表格提取(PDF) | table_extractor.py | pdfplumber |
| 音频转录 | audio_transcriber.py | openai-whisper + ffmpeg |
| 文档扫描/透视校正 | doc_scanner.py | opencv-python-headless, numpy, Pillow;img2pdf可选 |


依赖项与安装

核心功能无需安装

阅读、分析、表单填写、合同审查、收据扫描、银行对账单分析(PDF)、简历解析、身份证扫描、医疗摘要、编辑标记、会议纪要和翻译均基于Claude内置能力运行。

可选 — 仅为文件输出脚本安装

bash

PII编辑为PDF/图像文件(redactor.py)


pip install pymupdf>=1.23 # PDF编辑必需
pip install Pillow>=10.0 # 图像编辑必需
pip install pytesseract>=0.3 # 图像编辑必需(还需:brew install tesseract)

文档扫描/透视校正(doc_scanner.py)

pip install opencv-python-headless>=4.9 numpy>=1.24 Pillow>=10.0 pip install img2pdf>=0.5 # 可选 — 用于PDF输出;缺失时使用Pillow回退

从PDF提取表格(table_extractor.py)

pip install pdfplumber>=0.11

音频转录(audio_transcriber.py)

还需ffmpeg二进制文件:brew install ffmpeg / apt install ffmpeg

pip install openai-whisper>=20231117

所有依赖项也列在仓库根目录的requirements.txt中。

二进制依赖项

二进制文件被谁需要安装方式
tesseractredactor.py(图像模式)brew install tesseract / apt install tesseract-ocr
ffmpeg
audio_transcriber.py | brew install ffmpeg / apt install ffmpeg |

网络访问

openai-whisper在首次运行时从OpenAI/HuggingFace服务器下载模型文件(约140 MB)。缓存于~/.cache/whisper/。所有其他脚本安装后完全本地运行。



脚本参考


脚本依赖项用途示例
redactor.pypymupdf;Pillow + pytesseract(图像模式)将PII编辑为文件(PDF/图像/文本)python scripts/redactor.py --file doc.pdf --mode full --log
docscanner.py
opencv-python-headless, numpy, Pillow;img2pdf可选 | 文档扫描:边缘检测、透视校正、扫描质量输出 | python scripts/docscanner.py --input photo.jpg --output scanned.png --mode bw |
| expenselogger.py | 无 | 在CSV中添加/查看/编辑/删除费用条目 | python scripts/expenselogger.py add --date 2024-03-15 --merchant Starbucks --amount 13.12 --file expenses.csv |
| statementparser.py | 无 | 解析银行CSV导出文件,对交易进行分类 | python scripts/statementparser.py --file statement.csv --output categorized.json |
| reportgenerator.py | 无 | 将分类后的JSON格式化为Markdown报告 | python scripts/reportgenerator.py --file categorized.json --type bank |
| timelinemanager.py | 无 | 管理选择性加入的文档处理时间线 | python scripts/timelinemanager.py show |
| audiotranscriber.py | openai-whisper, ffmpeg | 将音频文件转录为文本 | python scripts/audiotranscriber.py --file meeting.mp3 --output transcript.txt |
| tableextractor.py | pdfplumber | 从PDF中提取表格为CSV或JSON | python scripts/tableextractor.py --file document.pdf --output data.csv |

所有脚本仅导入其声明的依赖项。未声明依赖项的脚本仅使用Python标准库。您可以验证任何脚本:显示[脚本名称]的源代码。



脚本导入验证


脚本标准库导入第三方库网络
timeline_manager.pyargparse, json, sys, datetime, pathlib, uuid, collections从不
redactor.py
argparse, re, sys, pathlib, dataclasses | pymupdf(PDF);Pillow + pytesseract(图像) | 从不 |
| doc_scanner.py | argparse, json, sys, time, pathlib | opencv-python-headless, numpy, Pillow;img2pdf可选 | 从不 |
| expense_logger.py | argparse, csv, json, sys, pathlib | 无 | 从不 |
| statement_parser.py | argparse, csv, json, re, sys, collections, datetime, pathlib | 无 | 从不 |
| report_generator.py | argparse, json, sys, collections, pathlib | 无 | 从不 |
| utils.py | re, unicodedata, datetime, pathlib | 无 | 从不 |
| audio_transcriber.py | argparse, sys, pathlib | openai-whisper | 仅首次运行下载模型 |
| table_extractor.py | argparse, csv, io, json, sys, pathlib | pdfplumber | 从不 |


隐私与数据处理


方面政策
文档内容
仅在本会话中本地读取。不存储、

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 doc-process-1776206652 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 doc-process-1776206652 技能

通过命令行安装

skillhub install doc-process-1776206652

下载

⬇ 下载 doc-process v4.1.1(免费)

文件大小: 138.1 KB | 发布时间: 2026-4-15 12:42

v4.1.1 最新 2026-4-15 12:42
setup.sh: added Python 3 check (exits with clear message if missing), pip bootstrap before any pip install — tries ensurepip, then apt/yum/dnf/brew package managers, then falls back to get-pip.py from pypa.io. Upgrades pip to latest before installing packages. Works on fresh EC2 instances (Amazon Linux 2, Amazon Linux 2023, Ubuntu) with no pre-installed pip.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部