返回顶部
o

office-toolkit办公工具包

|

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

office-toolkit

Office Toolkit

适用于 Office 和 PDF 文件的综合文档处理工具包。

ClawHub: https://clawhub.ai/weiwei2027/office-toolkit
安装: clawhub install office-toolkit

支持的格式

格式读取写入转换来源转换目标
DOCX-PDF
PPTX
✅ | ✅ | - | PDF | | XLSX | ✅ | ✅ | - | - | | PDF | ✅ | ✅ (来自 DOCX/PPTX) | DOCX, PPTX | - |

快速开始

读取文档

bash

Word


docx-read.py document.docx

PowerPoint

pptx-read.py presentation.pptx

Excel

xlsx-read.py spreadsheet.xlsx

PDF

pdf-read.py document.pdf

创建文档

bash

带内容的 Word


docx-write.py output.docx --title 报告 --content Hello World

带幻灯片的 PowerPoint

pptx-write.py output.pptx --title 演示文稿 --slides 5

带数据的 Excel

xlsx-write.py output.xlsx --sheet 数据 --data data.json

格式转换

bash

DOCX 转 PDF


convert.py document.docx --to pdf

PPTX 转 PDF

convert.py presentation.pptx --to pdf

安装

bash

安装所有依赖


pip install -r requirements/all.txt

或仅安装所需部分

pip install -r requirements/docx.txt # 仅 Word pip install -r requirements/pptx.txt # 仅 PowerPoint pip install -r requirements/xlsx.txt # 仅 Excel pip install -r requirements/pdf.txt # 仅 PDF

目录结构

office-toolkit/
├── SKILL.md # 本文件
├── requirements/ # 依赖文件
│ ├── base.txt # 核心依赖
│ ├── docx.txt # python-docx
│ ├── pptx.txt # python-pptx
│ ├── xlsx.txt # openpyxl
│ └── pdf.txt # pymupdf
├── scripts/ # CLI 工具
│ ├── docx-read.py
│ ├── docx-write.py
│ ├── pptx-read.py
│ ├── pptx-write.py
│ ├── xlsx-read.py
│ ├── xlsx-write.py
│ ├── pdf-read.py
│ ├── pdf-write.py
│ └── convert.py
├── lib/ # 共享库
│ ├── init.py
│ ├── base.py # 基类
│ ├── utils.py # 工具函数
│ └── validators.py # 输入验证
└── tests/ # 测试套件
├── test_docx.py
├── test_pptx.py
├── test_xlsx.py
└── test_pdf.py

Python API 使用

python
from lib.base import DocumentProcessor

处理 Word 文档

processor = DocumentProcessor(docx) text = processor.read(document.docx) processor.write(output.docx, content=新内容)

格式转换

processor.convert(document.docx, pdf)

注意事项

  • - DOCX: 使用 python-docx 库。支持文本、表格、样式、图片。
  • PPTX: 使用 python-pptx 库。支持幻灯片、文本、形状、图表。
  • XLSX: 使用 openpyxl 库。支持单元格、公式、图表、样式。
  • PDF: 使用 pymupdf (fitz) 进行读取,reportlab 进行创建。

路线图

  • - [x] Excel 支持 (xlsx 读写) - ✅ 已在 v1.0.1 中添加
  • [ ] 从零创建 PDF
  • [ ] 格式转换改进
  • [ ] 批量处理
  • [ ] 模板系统

更新日志

v1.0.1 (2026-03-20)

  • - 添加了 Excel (.xlsx) 读写支持
  • 改进了错误处理,提供更友好的提示信息
  • 为读取操作添加了 JSON 输出选项
  • 添加了 PDF 页面选择支持

v1.0.0 (2026-03-20)

  • - 初始版本发布
  • 支持 DOCX/PPTX/PDF 的读写

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 office-toolkit-1775890265 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 office-toolkit-1775890265 技能

通过命令行安装

skillhub install office-toolkit-1775890265

下载

⬇ 下载 office-toolkit v1.0.1(免费)

文件大小: 16.22 KB | 发布时间: 2026-4-12 10:45

v1.0.1 最新 2026-4-12 10:45
**office-toolkit v1.0.1**

- Added version, author, and project URL info to manifest
- Updated DOCX→PDF and PPTX→PDF conversion description
- Improved roadmap and marked Excel (xlsx) support as implemented
- Removed obsolete TEST_REPORT.md documentation file
- No changes to core logic or dependencies

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

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

p2p_official_large
返回顶部