npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@chenchaolong/plugin-mineru-ccl1

v1.0.0

Published

## 简介

Readme

MinerU Plugin

简介

MinerU 是一个将文件转换为机器可读格式(如 markdown、JSON)的工具,可以方便地提取为任意格式。

MinerU 是一个文档解析器,可以解析复杂的文档数据,适用于任何下游 LLM 用例(RAG、智能体等)。

GitHub - opendatalab/MinerU

主要特性

  • 移除页眉、页脚、脚注、页码等,确保语义连贯性
  • 以人类可读的顺序输出文本,适用于单列、多列和复杂布局
  • 保留原始文档的结构,包括标题、段落、列表等
  • 提取图片、图片描述、表格、表格标题和脚注
  • 自动识别并将文档中的公式转换为 LaTeX 格式
  • 自动识别并将文档中的表格转换为 HTML 格式
  • 自动检测扫描 PDF 和乱码 PDF 并启用 OCR 功能
  • OCR 支持检测和识别 84 种语言
  • 支持多种输出格式,如多模态和 NLP Markdown、按阅读顺序排序的 JSON,以及丰富的中间格式
  • 支持多种可视化结果,包括布局可视化和跨度可视化,用于高效确认输出质量
  • 支持在纯 CPU 环境中运行,也支持 GPU(CUDA)/NPU(CANN)/MPS 加速
  • 兼容 Windows、Linux 和 Mac 平台

支持的输入文件类型

PDF, DOC, DOCX, PPT, PPTX, PNG, JPG, JPEG

使用方法

配置步骤

  1. 配置 MinerU 插件参数:

  2. 保存配置

输入参数

| 参数 | 类型 | 必填 | 示例 | 描述 | | :--- | :--- | :--- | :--- | :--- | | enable_formula | bool | 否 | true | 是否启用公式识别,默认为 true | | enable_table | bool | 否 | true | 是否启用表格识别,默认为 true | | language | string | 否 | ch | 指定文档语言,默认为 ch,可以设置为 auto,当为 auto 时,模型将自动识别文档语言,其他可选值列表请参见:PaddleOCR | | enable_ocr | bool | 否 | false | 是否启动 OCR 功能,默认为 false | | extra_formats | [string] | 否 | ["docx","html"] | Markdown 和 json 是默认的导出格式,无需设置。此参数仅支持 docx、html、latex 三种格式中的一种或多种 | | model_version | string | 否 | pipeline | MinerU 模型版本;选项:pipeline 或 vlm,默认为 pipeline |

输出

插件为每个处理的文件提供以下输出:

  • text: 解析后的 Markdown 文本
  • files: 额外导出格式的文件(html、docx、latex)和提取的图片
  • json: 解析后的内容列表

支持的导出格式

默认情况下,插件会输出 Markdown 和 JSON 格式。通过 extra_formats 参数,还可以获取以下额外格式:

  • HTML: 格式化的 HTML 文档
  • DOCX: Microsoft Word 文档格式
  • LaTeX: LaTeX 源代码格式

这些额外格式的文件将存储在输出的 files 中。

技术细节

API 端点

插件使用 MinerU 官方 API,主要端点包括:

  • POST /api/v4/file-urls/batch: 创建解析任务
  • GET /api/v4/extract-results/batch/{batch_id}: 获取解析结果

处理流程

  1. 上传文件到 MinerU API 获取的上传 URL
  2. 创建解析任务
  3. 轮询获取解析结果
  4. 下载并解压 ZIP 文件
  5. 提取 Markdown、图片、JSON 等格式的内容
  6. 替换 Markdown 中的图片路径为可访问的 URL

许可证

请参考项目根目录的 LICENSE 文件。