来源信息
- 仓库
- CoderWanFeng/python-office
- 最近来源活动
- 2026年8月4日 13:18
- 检测到的 SKILL.md 语言
- 中文
- 星标
- 1,371
- Forks
- 305
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
文件资源管理器
2 个文件正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- docx4imgs
- description
- 从 Word 文档中提取所有图片并保存到指定目录。当用户提到 Word 提取图片、docx 抠图、Word 取图时使用。
# docx4imgs Skill
> 从 Word 里提取图片
## 功能描述
从 Word 文档中提取所有图片,并保存到指定目录。会自动根据 word 名称在指定文件夹下生成一个子目录。
## 所属分类
`office/skills/word/docx4imgs/`
## 调用方式
```python
from skills.word import docx4imgs
docx4imgs(
word_path='./test.docx',
img_path='./images/'
)
```
## 参数说明
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|------|------|------|--------|------|
| `word_path` | str | 是 | - | Word 文档的路径 |
| `img_path` | str | 是 | - | 提取图片的存储位置。会根据 word 名称在指定文件夹下自动生成一个子目录 |
## 返回值
`None`
## 使用示例
```python
from skills.word import docx4imgs
docx4imgs(word_path='./document.docx', img_path='./extracted_images/')
```
## 原始函数
`office.api.word.docx4imgs`
在 GitHub 查看