docling
使用具有 GPU 加速功能的 docling CLI 从网页、PDF、文档(docx、pptx)和图像中提取和解析内容。当您需要干净的结构化文本时,请使用 INSTEAD 代替 web_fetch 从特定 URL 中提取内容。使用 Brave (web_search) 搜索/发现页面。当您有 URL 并需要解析其内容时,请使用 docling。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw skills install shop:totalclaw:totalclaw~er3mit4-doclingcURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~er3mit4-docling/file -o er3mit4-docling.md## 概述(中文) 使用具有 GPU 加速功能的 docling CLI 从网页、PDF、文档(docx、pptx)和图像中提取和解析内容。当您需要干净的结构化文本时,请使用 INSTEAD 代替 web_fetch 从特定 URL 中提取内容。使用 Brave (web_search) 搜索/发现页面。当您有 URL 并需要解析其内容时,请使用 docling。 ## 原文 # Docling - Document & Web Content Extraction CLI tool for parsing documents and web pages into clean, structured text. Uses GPU acceleration for OCR and ML models. ## Prerequisites - `docling` CLI must be installed (e.g., via `pipx install docling`) - For GPU support: NVIDIA GPU with CUDA drivers ## When to Use - **Extract content from a URL** → Use docling (not web_fetch) - **Search for information** → Use web_search (Brave) - **Parse PDFs, DOCX, PPTX** → Use docling - **OCR on images** → Use docling ## Quick Commands ### Web Page → Markdown (default) ```bash docling "<URL>" --from html --to md ``` Output: creates a `.md` file in current directory (or use `--output`) ### Web Page → Plain Text ```bash docling "<URL>" --from html --to text --output /tmp/docling_out ``` ### PDF with OCR ```bash docling "/path/to/file.pdf" --ocr --device cuda --output /tmp/docling_out ``` ## Key Options | Option | Values | Description | |--------|--------|-------------| | `--from` | html, pdf, docx, pptx, image, md, csv, xlsx | Input format | | `--to` | md, text, json, yaml, html | Output format | | `--device` | auto, cuda, cpu | Accelerator (default: auto) | | `--output` | path | Output directory (recommended: use controlled temp dir) | | `--ocr` | flag | Enable OCR for images/scanned PDFs | | `--tables` | flag | Extract tables (default: on) | ## Security Notes ⚠️ **Avoid these flags unless you trust the source:** - `--enable-remote-services` - can send data to remote endpoints - `--allow-external-plugins` - loads third-party code - Custom `--headers` with untrusted values - can redirect requests ## Workflow 1. **For web content extraction**: Use `docling "<URL>" --from html --to text --output /tmp/docling_out` 2. **Read the output file** from the specified output directory 3. **Clean up** the output directory after reading ## GPU Support Docling supports GPU acceleration via CUDA (NVIDIA). Verify CUDA is available: ```bash python -c "import torch; print(torch.cuda.is_available())" ``` ## Full CLI Reference See [references/cli-reference.md](references/cli-reference.md) for complete option list.