搜索

PythonReactSEOPDF
OpenClaw

pdfagent

Self-hosted PDF operations and conversions with metered usage output.

cap-txt0 来源安装数☆ 0 仓库 Starsv0.1.0

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install cap-txt/pdfagent

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

PDF Agent

Summary

  • Use pdfagent to perform PDF operations (merge, split, compress, convert, OCR, etc.) with detailed usage metering in the output.
  • Best for local, self-hosted processing where inputs/outputs must stay on disk.
  • This skill ships source code in pdfagent/ and runs via uv run from scripts/pdfagent_cli.py (no PyPI publish required).

Requirements

  • uv installed and on PATH.
  • System tools as needed by specific commands: qpdf, ghostscript, poppler (pdftoppm), libreoffice, chromium (for HTML -> PDF), and ocrmypdf.

Core Usage

  • Merge PDFs with usage metrics: uv run {baseDir}/scripts/pdfagent_cli.py merge file1.pdf file2.pdf --out merged.pdf --json
  • Split a PDF by ranges: uv run {baseDir}/scripts/pdfagent_cli.py split input.pdf --range "1-3,5" --out-dir out_dir --json
  • Compress a PDF with a preset: uv run {baseDir}/scripts/pdfagent_cli.py compress input.pdf --preset ebook --out compressed.pdf --json
  • Convert images to PDF: uv run {baseDir}/scripts/pdfagent_cli.py jpg-to-pdf image1.jpg image2.png --out output.pdf --json
  • OCR a scanned PDF: uv run {baseDir}/scripts/pdfagent_cli.py ocr scan.pdf --lang eng --out scan_ocr.pdf --json
  • Agent mode for multi-step instructions: uv run {baseDir}/scripts/pdfagent_cli.py agent "merge then rotate 90 degrees every other page" -i file1.pdf -i file2.pdf --out out.pdf --json
  • Dependency/binary check: uv run {baseDir}/scripts/pdfagent_cli.py doctor --json

Notes

  • Use --json for machine-readable outputs (includes usage and outputs).
  • For encrypted PDFs, pass --password or per-file --passwords.
  • If a conversion tool is missing, pdfagent may use a fallback path and will note it in output or logs.
  • Optional Python deps are still command-specific: uv run --with pdf2docx --with camelot-py[cv] --with pdfplumber --with pyhanko {baseDir}/scripts/pdfagent_cli.py <command> ...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/cap-txt/pdfagent
Version
0.1.0
Commit
8722e62fb2d52cbc045ddcae70a790ec641e98ba
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# PDF Agent

Summary
- Use `pdfagent` to perform PDF operations (merge, split, compress, convert, OCR, etc.) with detailed usage metering in the output.
- Best for local, self-hosted processing where inputs/outputs must stay on disk.
- This skill ships source code in `pdfagent/` and runs via `uv run` from `scripts/pdfagent_cli.py` (no PyPI publish required).

Requirements
- `uv` installed and on PATH.
- System tools as needed by specific commands: `qpdf`, `ghostscript`, `poppler` (`pdftoppm`), `libreoffice`, `chromium` (for HTML -> PDF), and `ocrmypdf`.

Core Usage
- Merge PDFs with usage metrics:
  `uv run {baseDir}/scripts/pdfagent_cli.py merge file1.pdf file2.pdf --out merged.pdf --json`
- Split a PDF by ranges:
  `uv run {baseDir}/scripts/pdfagent_cli.py split input.pdf --range "1-3,5" --out-dir out_dir --json`
- Compress a PDF with a preset:
  `uv run {baseDir}/scripts/pdfagent_cli.py compress input.pdf --preset ebook --out compressed.pdf --json`
- Convert images to PDF:
  `uv run {baseDir}/scripts/pdfagent_cli.py jpg-to-pdf image1.jpg image2.png --out output.pdf --json`
- OCR a scanned PDF:
  `uv run {baseDir}/scripts/pdfagent_cli.py ocr scan.pdf --lang eng --out scan_ocr.pdf --json`
- Agent mode for multi-step instructions:
  `uv run {baseDir}/scripts/pdfagent_cli.py agent "merge then rotate 90 degrees every other page" -i file1.pdf -i file2.pdf --out out.pdf --json`
- Dependency/binary check:
  `uv run {baseDir}/scripts/pdfagent_cli.py doctor --json`

Notes
- Use `--json` for machine-readable outputs (includes `usage` and `outputs`).
- For encrypted PDFs, pass `--password` or per-file `--passwords`.
- If a conversion tool is missing, `pdfagent` may use a fallback path and will note it in output or logs.
- Optional Python deps are still command-specific:
  `uv run --with pdf2docx --with camelot-py[cv] --with pdfplumber --with pyhanko {baseDir}/scripts/pdfagent_cli.py <command> ...`

相关技能

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.