闲社服务运行正常AI智能体自动化平台
p

pypdf工具

技能标识:pypdf

Extract text, metadata, and pages from PDF files using pypdf. Use for tasks such as reading PDF content, extracting specific pages, splitting or merging PDFs, reading document metadata, and rotating or transforming pages.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

pypdf工具

pypdf

使用 scripts/pypdf_cli.py 进行确定性的 PDF 操作,而非临时编写 pypdf 代码片段。

工作流程

  1. 1. 确认 PDF 文件路径在本地可访问。
  2. 运行所需命令(检查、提取文本、提取页面、合并、拆分、旋转)。
  3. 检查文本输出或生成的 PDF 文件。

命令指南

  • - 检查元数据和页数:
- python scripts/pypdf_cli.py info --input <文件.pdf>
  • - 提取所有文本:
- python scripts/pypdf_cli.py extract-text --input <文件.pdf>
  • - 提取指定页面的文本(从 0 开始索引):
- python scripts/pypdf_cli.py extract-text --input <文件.pdf> --pages 0 1 2
  • - 将 PDF 拆分为单页文件:
- python scripts/pypdf_cli.py split --input <文件.pdf> --output-dir <目录/>
  • - 提取页面范围并生成新 PDF:
- python scripts/pypdf_cli.py extract-pages --input <文件.pdf> --pages 0 1 2 --output <输出.pdf>
  • - 合并多个 PDF:
- python scripts/pypdf_cli.py merge --inputs --output <合并后.pdf>
  • - 旋转页面:
- python scripts/pypdf_cli.py rotate --input <文件.pdf> --angle 90 --output <旋转后.pdf> - --angle 必须为 90、180 或 270。 - 可选地使用 --pages 0 2 限制特定页面。

操作规则

  • - 所有命令中的页面均从 0 开始索引。
  • 对于 extract-text,输出到标准输出;需要时重定向到文件。
  • 对于写入新 PDF 的命令,需要显式指定 --output。
  • 如缺少依赖,请安装:pip install pypdf。

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 pypdf-1776293908 技能

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

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

通过命令行安装

skillhub install pypdf-1776293908

下载

⬇ 下载 pypdf v1.0.0(免费)

文件大小: 3.33 KB | 发布时间: 2026-4-16 18:24

v1.0.0 最新 2026-4-16 18:24
- Initial release of the pypdf skill.
- Provides CLI for extracting text, metadata, and specific pages from PDF files.
- Supports splitting, merging, and rotating PDFs via deterministic commands.
- All operations use scripts/pypdf_cli.py, with clear command structure and instructions.
- Explicit requirements and operational rules included for consistent usage.
返回顶部