Mineru file parse

From cas-bigdatalab/piflow · View interactive version

Mineru file parse is an AI agent skill from the GitHub repository cas-bigdatalab/piflow. MinerU文件解析算子。通过远程调用MinerU接口,解析本地文件(支持PDF、DOC、PPT、Excel、图片等格式),获取文件解析结果(内容、公式、图片等),最终返回ZIP压缩包。 本SKILL依赖requests库,请确保已安装。

How to use this skill

Skill file

功能概述

该算子通过远程调用MinerU API,对本地文件进行智能解析,提取文件中的文本内容、公式、图片等信息,最终将解析结果打包为ZIP压缩包返回。

支持的文件类型

核心参数

| 参数 | 类型 | 必填 | 默认值 | 说明 |

|------|------|------|--------|------|

| file_path | string | 是 | - | 本地文件路径 |

| output_zip | string | 是 | - | 输出ZIP压缩包路径 |

| model_version | string | 否 | vlm | 模型版本 |

| poll_interval | int | 否 | 5 | 轮询间隔(秒) |

| timeout | int | 否 | 1800 | 超时时间(秒) |

使用示例

命令行调用

# 基础用法
python scripts/run_mineru_file_parse.py \
  --file_path /path/to/input.pdf \
  --output_zip /path/to/output.zip

# 指定模型版本和轮询参数
python scripts/run_mineru_file_parse.py \
  --file_path /path/to/input.docx \
  --output_zip /path/to/output.zip \
  --model_version vlm \
  --poll_interval 10 \
  --timeout 3600

参数说明

输出内容

解析完成后,输出的ZIP压缩包包含:

注意事项

  1. 需要有效的MinerU API密钥才能使用(系统内配置)
  2. 网络连接必须正常,能够访问MinerU服务
  3. 大文件解析可能需要较长时间,请适当调整timeout参数
  4. 支持的文件大小受MinerU服务限制
  5. 输出目录不存在时会自动创建
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.