返回顶部
l

liteparse轻量解析

Parse, extract text from, and screenshot PDF and document files locally using the LiteParse CLI (`lit`). Use when asked to extract text from a PDF, parse a Word/Excel/PowerPoint file, batch-process a folder of documents, or generate page screenshots for LLM vision workflows. Runs entirely offline — no cloud, no API key. Supports PDF, DOCX, XLSX, PPTX, images (jpg/png/webp), and more. Triggers on phrases like "extract text from this PDF", "parse this document", "get the text out of", "screenshot

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

liteparse

LiteParse

基于PDF.js + Tesseract.js构建的本地文档解析器。零云端依赖。

二进制文件: lit(通过npm全局安装)
文档: https://developers.llamaindex.ai/liteparse/

快速参考

bash

将PDF解析为文本(标准输出)


lit parse document.pdf

解析到文件

lit parse document.pdf -o output.txt

解析为JSON(包含边界框)

lit parse document.pdf --format json -o output.json

仅解析特定页面

lit parse document.pdf --target-pages 1-5,10,15-20

不使用OCR(速度更快,仅限文本层PDF)

lit parse document.pdf --no-ocr

批量解析目录

lit batch-parse ./input-dir ./output-dir

截取页面截图(用于视觉模型输入)

lit screenshot document.pdf -o ./screenshots lit screenshot document.pdf --target-pages 1,3,5 --dpi 300 -o ./screenshots

输出格式

格式使用场景
text(默认)纯文本提取,用于输入提示词
json
包含边界框的结构化输出,适用于布局感知任务 |

OCR行为

  • - 默认通过Tesseract.js开启OCR(首次运行下载约10MB英文数据)
  • 首次运行较慢;后续运行使用缓存数据
  • --no-ocr用于纯文本层PDF(速度更快,无需网络)
  • 多语言支持:--ocr-language fra+eng

支持的文件类型

原生支持:PDF

需要LibreOffice(brew install --cask libreoffice):.docx, .doc, .xlsx, .xls, .pptx, .ppt, .odt, .csv

需要ImageMagick(brew install imagemagick):.jpg, .png, .gif, .bmp, .tiff, .webp

安装说明

  • - 通过npm安装:npm install -g @llamaindex/liteparse
  • 存在Homebrew公式(brew tap run-llama/liteparse),但需要当前macOS命令行工具——本机建议使用npm作为主要安装路径
  • 二进制文件路径:/opt/homebrew/bin/lit

工作流技巧

  • - 对于VA表格、职位描述PDF、军事文档:使用lit parse file.pdf -o /tmp/output.txt然后读入上下文
  • 对于扫描版PDF(无文本层):需要OCR;复杂布局可能降低效果——关键文档可考虑使用LlamaParse云端服务
  • 对于视觉模型工作流:使用lit screenshot生成页面图像,然后传递给image工具或类似工具
  • 对于批量任务:使用lit batch-parse——它会在文件间复用PDF引擎以提高效率

局限性

  • - 复杂表格、多列布局和扫描版政府表单可能产生不完美的输出
  • LlamaParse(云端)处理困难情况:https://cloud.llamaindex.ai
  • 截图推荐最大DPI:300(更高值意味着更慢速度和更大文件)

参考

参见references/output-examples.md获取示例JSON/文本输出结构。

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 liteparse-1776108302 技能

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

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

通过命令行安装

skillhub install liteparse-1776108302

下载

⬇ 下载 liteparse v1.0.0(免费)

文件大小: 3.11 KB | 发布时间: 2026-4-14 14:34

v1.0.0 最新 2026-4-14 14:34
Initial release: local PDF/doc parser skill using LiteParse CLI

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

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

p2p_official_large
返回顶部