OpenParable
Skip to content
← Back to skills

Mineru URL Parse

Documents
mineru_url_parse

Mineru URL Parse is an Agent Skill for documents published in the cas-bigdatalab/piflow repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

MinerU URL解析算子。通过远程调用MinerU接口,解析在线文档URL(支持PDF、DOC、PPT、Excel、图片等格式),获取文件解析结果(内容、公式、图片等),最终返回ZIP压缩包。 本SKILL依赖requests库,请确保已安装。

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/cas-bigdatalab/piflow/blob/HEAD/workspace/skills/mineru_url_parse/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/mineru-url-parse, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

功能概述

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

支持的文件类型

  • PDF文件(.pdf)
  • Word文档(.doc, .docx)
  • PowerPoint演示文稿(.ppt, .pptx)
  • Excel表格(.xls, .xlsx)
  • 图片文件(.jpg, .jpeg, .png, .bmp, .gif等)

核心参数

参数类型必填默认值说明
urlstring是-在线文档URL
output_zipstring是-输出ZIP压缩包路径
model_versionstring否vlm模型版本
poll_intervalint否5轮询间隔(秒)
timeoutint否1800超时时间(秒)

使用示例

命令行调用

# 基础用法
python scripts/run_mineru_url_parse.py \
  --url https://example.com/document.pdf \
  --output_zip /path/to/output.zip

# 指定模型版本和轮询参数
python scripts/run_mineru_url_parse.py \
  --url https://example.com/document.docx \
  --output_zip /path/to/output.zip \
  --model_version vlm \
  --poll_interval 10 \
  --timeout 3600

参数说明

  • --url: 需要解析的在线文档URL
  • --output_zip: 解析结果ZIP压缩包的输出路径
  • --model_version: 选择使用的模型版本,默认vlm
  • --poll_interval: 查询解析状态的间隔时间,默认5秒
  • --timeout: 解析任务的最大等待时间,默认30分钟

输出内容

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

  • 文件文本内容提取结果
  • 公式识别结果
  • 图片提取结果
  • 解析元数据信息

注意事项

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