OpenParable
Skip to content
← Back to skills

Docx Text Extract

Documents
docx_text_extract

Docx Text Extract is an Agent Skill for documents published in the cas-bigdatalab/piflow repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

从DOCX文件中提取文本内容

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/cas-bigdatalab/piflow/blob/HEAD/workspace/skills/docx_text_extract/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/docx-text-extract, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

docx_text_extract 技能

功能说明

该技能从DOCX文件中提取纯文本内容,保存为txt文件,适用于需要提取文档文本进行分析或处理的场景。

核心功能

  • 提取DOCX中的文本内容
  • 保持段落结构
  • 支持UTF-8编码
  • 自动创建输出目录

使用方法

python scripts/run_docx_text_extract.py --input_path <输入DOCX> --output_path <输出TXT>

参数说明

参数类型必填默认值说明
input_pathstring是-输入DOCX文件路径
output_pathstring是-输出TXT文件路径

示例

python scripts/run_docx_text_extract.py --input_path document.docx --output_path text.txt

注意事项

  • 输出目录不存在时会自动创建
  • 提取的文本会保持段落分隔
  • 不支持提取图片中的文字(如需请使用OCR工具)
  • 如果DOCX文件损坏或不是标准格式,可能提取失败