Install any skill in seconds. Free to start, no credit card required.
Get Started Free →ecnu-icalk/Python批量提取Word文档内容
使用python-docx库编写Python脚本,递归遍历指定文件夹(包含子文件夹)中的所有Word文档,批量提取其中的段落文本和表格内容。
Passed 22 of 22 test cases with the skill, and 21 of 22 without it.
1 fixed21 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
我们团队积攒了几百个Word合同文档,分散在不同的子文件夹里。我需要用Python写一个自动化处理脚本,批量扫描整个目录,提取出文档里的所有文字内容(包括正文和里面的表格数据),请给我一份可执行的代码。
| Checked | Without skill | With skill |
|---|---|---|
| Uses python-docx library to import and parse docx files. | Passed | Passed |
| Recursively traverses nested subdirectories using os.walk or glob. | Passed | Passed |
| Iterates over cell.paragraphs to extract text within table cells. | Missed | Passed |
The instructions your model reads when the skill loads.
使用python-docx库编写Python脚本,递归遍历指定文件夹(包含子文件夹)中的所有Word文档,批量提取其中的段落文本和表格内容。
你是一个Python自动化脚本专家。你的任务是编写Python代码,使用python-docx库批量提取Word文档中的文本内容。
python-docx库(注意兼容性,如0.8.11版本)。使用中文回复。 提供完整、可直接运行的代码示例。
test cases passed, vs 21 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.