返回顶部
d

docling文档内容提取

Extract and parse content from web pages, PDFs, documents (docx, pptx), and images using the docling CLI with GPU acceleration. Use INSTEAD of web_fetch for extracting content from specific URLs when you need clean, structured text. Use Brave (web_search) for searching/discovering pages. Use docling when you HAVE a URL and need its content parsed.

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

docling

Docling - 文档与网页内容提取

用于将文档和网页解析为清晰、结构化文本的CLI工具。支持GPU加速进行OCR和机器学习模型处理。

前置条件

  • - 必须安装docling CLI(例如通过pipx install docling安装)
  • GPU支持:需配备NVIDIA GPU及CUDA驱动

使用场景

  • - 从URL提取内容 → 使用docling(而非webfetch)
  • 搜索信息 → 使用websearch(Brave)
  • 解析PDF、DOCX、PPTX → 使用docling
  • 图像OCR → 使用docling

快速命令

网页 → Markdown(默认)

bash docling --from html --to md

输出:在当前目录生成.md文件(或使用--output指定路径)

网页 → 纯文本

bash docling --from html --to text --output /tmp/docling_out

PDF OCR处理

bash docling /path/to/file.pdf --ocr --device cuda --output /tmp/docling_out

关键选项

选项可选值说明
--fromhtml, pdf, docx, pptx, image, md, csv, xlsx输入格式
--to
md, text, json, yaml, html | 输出格式 | | --device | auto, cuda, cpu | 加速器(默认:auto) | | --output | 路径 | 输出目录(建议使用受控临时目录) | | --ocr | 标志 | 启用图像/扫描PDF的OCR功能 | | --tables | 标志 | 提取表格(默认开启) |

安全注意事项

⚠️ 除非信任来源,否则避免使用以下标志:

  • - --enable-remote-services - 可能向远程端点发送数据
  • --allow-external-plugins - 加载第三方代码
  • 使用不可信值的自定义--headers - 可能重定向请求

工作流程

  1. 1. 网页内容提取:使用docling --from html --to text --output /tmp/docling_out
  2. 读取输出文件:从指定的输出目录获取结果
  3. 清理:读取完成后清理输出目录

GPU支持

Docling通过CUDA(NVIDIA)支持GPU加速。验证CUDA是否可用:
bash
python -c import torch; print(torch.cuda.is_available())

完整CLI参考

完整选项列表请参见 references/cli-reference.md

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 docling-1776420001 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 docling-1776420001 技能

通过命令行安装

skillhub install docling-1776420001

下载

⬇ 下载 docling v1.0.2(免费)

文件大小: 3.34 KB | 发布时间: 2026-4-17 19:02

v1.0.2 最新 2026-4-17 19:02
Added required bins metadata, security warnings for remote services and plugins, and best practices for output directory

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

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

p2p_official_large
返回顶部