Shihao Jiang (Zac)

DOCX Toolkit

办公效率v1.0.0
作者:Shihao Jiang (Zac)更新于 2026-05-11docx-toolkit@clawhub_zacjiang/docx-toolkit
文档处理#Docx#Cjk#Doc#Extract#Images

据 AlphaMoat 统计,截至 2026-09,DOCX Toolkit 累计下载 2,944 次、获 0 个星标,在全部 5,078 个 AI 技能中排名第 3,770 位,在「办公效率」分类(435 个)中排名第 278 位。

累计安装
179
累计下载
2,944
星标
-
全站排名
#3,770
全站前 75% · 「办公效率」前 64%
平台累计安装累计下载星标评论
ClawHub ↗361,329--
SkillHub ↗1792,944-—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

主文描述处理 DOCX 与旧版 DOC 文件,并按文档结构导出段落、表格及嵌入图像。提取结果可能复制原文中的敏感内容;将输入和输出保存在受限位置,并在隔离环境中管理相关依赖。

资料发布于 2026-10-27

可以用来做什么

  • 提取 Word 文档的正文和表格
  • 提取文档内嵌图像供审阅
  • 整理输出文本以供后续分析

什么时候用

  • 需要分析或迁移 Word 文档内容时
  • 确保有权处理文档并妥善保护提取输出时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

从这个获准处理的文档提取文本、表格和图像,并说明输出将保存在哪里。

月度数据趋势

累计下载2,944
4871,8073,1262026-03 · 累计下载 6692026-05 · 累计下载 1,6662026-06 · 累计下载 1,8602026-07 · 累计下载 2,1212026-08 · 累计下载 2,2932026-09 · 累计下载 2,94426-0326-09
星标-
0112026-03 · 星标 -2026-05 · 星标 -2026-06 · 星标 -2026-07 · 星标 -2026-08 · 星标 -2026-09 · 星标 -26-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-092,944—-
2026-082,293+8.1%-
2026-072,121+14.0%-
2026-061,860+11.6%-
2026-051,666—-
2026-03669—-

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

2.3 KB · ClawHub v1.0.0
---
name: docx-toolkit
description: Extract text, tables, and images from .docx and legacy .doc files. Handles large documents, CJK text, and complex table structures. Includes deduplication and filtering for extracted images.
author: zacjiang
version: 1.0.0
tags: docx, doc, word, extract, text, tables, images, document, office, CJK, chinese
---

# DOCX Toolkit
展开全部(共 68 行)
A complete toolkit for processing Microsoft Word documents (.docx and legacy .doc formats).

## Capabilities

### 1. Text + Table Extraction (.docx)
```bash
python3 {baseDir}/scripts/extract_text.py input.docx output.txt
```
Extracts all paragraphs and tables with structure preserved. Tables are formatted as pipe-delimited rows for easy parsing.

### 2. Text Extraction (Legacy .doc)
```bash
python3 {baseDir}/scripts/extract_doc_text.py input.doc output.txt
```
Handles legacy OLE2 .doc format using olefile. Extracts Unicode text from the WordDocument stream.

### 3. Image Extraction (.docx)
```bash
python3 {baseDir}/scripts/extract_images.py input.docx output_dir/
```
Extracts all embedded images with:
- Automatic deduplication (MD5 hash comparison)
- Size filtering (skips tiny icons <5KB by default)
- Sequential renaming (img_001.png, img_002.jpg, etc.)

### 4. Image Compression
```bash
python3 {baseDir}/scripts/resize_images.py input_dir/ output_dir/ [--max-width 1024]
```
Batch resize/compress images for API processing (saves 50-70% on vision API costs).

## Dependencies

- Python 3.6+
- `python-docx` — for .docx processing
- `olefile` — for legacy .doc processing  
- `Pillow` — for image resizing (optional, only needed for resize script)

Install:
```bash
pip3 install python-docx olefile Pillow
```

## Use Cases

- **Document analysis**: Extract text for AI review/summarization
- **Migration**: Pull content from Word docs into other formats
- **Image audit**: Extract and review all embedded images
- **Cost optimization**: Compress images before sending to vision APIs
- **Batch processing**: Process multiple documents in a pipeline

## Notes

- Large .doc files (>200MB) may require significant RAM for olefile processing
- Image extraction preserves original format (png/jpg/gif/etc.)
- Deduplication catches exact duplicates; near-duplicates still pass through
- CJK (Chinese/Japanese/Korean) text is fully supported in both extractors

「办公效率」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。