docx
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
02 资源文件 83
- 许可证LICENSE1.0 KB
- 参考文档references/pitfalls.md2.2 KB
- 参考文档references/revisions-and-comments.md3.9 KB
- 参考文档references/usage.md7.1 KB
- 参考文档references/xml-editing.md8.2 KB
- 脚本scripts/docx_comments.py10.4 KB
- 脚本scripts/docx_common.py3.3 KB
- 脚本scripts/docx_create.py6.2 KB
- 脚本scripts/docx_edit.py8.4 KB
- 脚本scripts/docx_read.py5.3 KB
- 脚本scripts/docx_revisions.py4.5 KB
- 脚本scripts/docx_template.py2.4 KB
- 脚本scripts/docx_validate.py6.1 KB
- 脚本scripts/xml-toolchain/__init__.py1 B
- 脚本scripts/xml-toolchain/accept_changes.py4.0 KB
- 脚本scripts/xml-toolchain/comment.py10.4 KB
- 脚本scripts/xml-toolchain/convert_doc.py4.5 KB
- 脚本scripts/xml-toolchain/delete_sections.py6.1 KB
- 脚本scripts/xml-toolchain/docx_patch.py19.2 KB
- 脚本scripts/xml-toolchain/inspect_doc.py17.6 KB
- 脚本scripts/xml-toolchain/inspect_headers.py4.7 KB
- 脚本scripts/xml-toolchain/inspect_tables.py5.5 KB
- 脚本scripts/xml-toolchain/list_sections.py3.9 KB
- 脚本scripts/xml-toolchain/office/helpers/__init__.py—
- 脚本scripts/xml-toolchain/office/helpers/merge_runs.py5.4 KB
- 脚本scripts/xml-toolchain/office/helpers/simplify_redlines.py5.6 KB
- 脚本scripts/xml-toolchain/office/pack.py4.8 KB
- 脚本scripts/xml-toolchain/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd1.9 KB
- 脚本scripts/xml-toolchain/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd2.5 KB
- 脚本scripts/xml-toolchain/office/schemas/ecma/fouth-edition/opc-digSig.xsd2.8 KB
- 脚本scripts/xml-toolchain/office/schemas/ecma/fouth-edition/opc-relationships.xsd1.3 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd73.2 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd6.8 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd50.1 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd624 B
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd148.5 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd1.2 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd8.7 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd14.4 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/pml.xsd81.7 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd1.2 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd7.2 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd6.2 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd1.2 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd880 B
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd2.5 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd3.4 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd7.3 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd22.8 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd1.3 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/sml.xsd236.6 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd25.5 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd24.7 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd535 B
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd5.6 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd3.9 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/wml.xsd167.4 KB
- 脚本scripts/xml-toolchain/office/schemas/ISO-IEC29500-4_2016/xml.xsd4.5 KB
- 脚本scripts/xml-toolchain/office/schemas/mce/mc.xsd3.1 KB
- 脚本scripts/xml-toolchain/office/schemas/microsoft/wml-2010.xsd25.9 KB
- 脚本scripts/xml-toolchain/office/schemas/microsoft/wml-2012.xsd3.7 KB
- 脚本scripts/xml-toolchain/office/schemas/microsoft/wml-2018.xsd901 B
- 脚本scripts/xml-toolchain/office/schemas/microsoft/wml-cex-2018.xsd1.7 KB
- 脚本scripts/xml-toolchain/office/schemas/microsoft/wml-cid-2016.xsd1002 B
- 脚本scripts/xml-toolchain/office/schemas/microsoft/wml-sdtdatahash-2020.xsd600 B
- 脚本scripts/xml-toolchain/office/schemas/microsoft/wml-symex-2015.xsd745 B
- 脚本scripts/xml-toolchain/office/soffice.py5.2 KB
- 脚本scripts/xml-toolchain/office/unpack.py3.9 KB
- 脚本scripts/xml-toolchain/office/validate.py3.6 KB
- 脚本scripts/xml-toolchain/office/validators/__init__.py336 B
- 脚本scripts/xml-toolchain/office/validators/base.py30.9 KB
- 脚本scripts/xml-toolchain/office/validators/docx.py15.4 KB
- 脚本scripts/xml-toolchain/office/validators/pptx.py9.3 KB
- 脚本scripts/xml-toolchain/office/validators/redlining.py8.6 KB
- 脚本scripts/xml-toolchain/render_doc.py5.2 KB
- 脚本scripts/xml-toolchain/replace_field.py10.2 KB
- 脚本scripts/xml-toolchain/replace_text.py15.3 KB
- 脚本scripts/xml-toolchain/templates/comments.xml2.5 KB
- 脚本scripts/xml-toolchain/templates/commentsExtended.xml2.5 KB
- 脚本scripts/xml-toolchain/templates/commentsExtensible.xml2.6 KB
- 脚本scripts/xml-toolchain/templates/commentsIds.xml2.6 KB
- 脚本scripts/xml-toolchain/templates/people.xml115 B
- 脚本tests/test_docx_skill.py20.8 KB
03 SKILL.md 正文
Docx Skill
Create, read, edit, and template Microsoft Word .docx files with
python-docx via small CLIs. It handles text, styles, lists, tables,
images, headers/footers, {{token}} templating, tracked changes
(list/accept/reject), comments (list/add/delete), TOC and page-number
fields, and package health checks. It does not render documents itself
(PDF needs LibreOffice — see Converting to PDF in references/usage.md)
or edit legacy .doc.
Global rules
- Run every helper through
scripts/; never sed or unzip-edit the XML. Raw text substitution indocument.xmlcorrupts files easily — use the provided scripts (seereferences/xml-editing.mdfor the toolchain). - Verify after every produce-or-edit action. Re-read the output with
docx_read.py --text/--structure, and rundocx_validate.pyafter any revision, comment, or field surgery (checklist inreferences/usage.md). - Always
normalizebefore find-replace on Word-edited documents. Word fragments text into runs;docx_edit.py normalizemerges equal-format adjacent runs so later matches succeed. - Template redlining requires reading
references/xml-editing.mdfirst. The raw-XML toolchain underscripts/xml-toolchain/is for direct OOXML access only; edit the template in place, never recreate it.
Routing
| Step | Reference | Purpose |
|---|---|---|
| Commands + procedure | references/usage.md |
Prerequisites, quick-reference command table, end-to-end procedure, Converting to PDF, and the post-edit verification checklist. |
| Raw-XML toolchain | references/xml-editing.md |
Unpack/repack, redlining, .dotx templates, tracked changes via LibreOffice. |
| Tracked changes + comments | references/revisions-and-comments.md |
Revision types, acceptance flow, comment threading, and which edge cases to hand to Word. |
| Edge-case behaviors | references/pitfalls.md |
Run fragmentation, revision coverage limits, field results, validation semantics, style numbering, cell formatting, and encoding. |
04 同仓库更多 Skills
github-workflow
Umbrella for GitHub auth, repo management, issues, PRs, Mergify, and releases. Subsumes github-auth and repo-manager.
brave-automation
baa CLI: Brave profiles, Google sessions, credentials.
aes
AES docs, layers, rule fixes, and legacy migration.
pretext
Build creative browser demos with DOM-free text layout.
popular-web-designs
54 real design systems (Stripe, Linear, Vercel) as HTML/CSS.
p5js
p5.js sketches: gen art, shaders, interactive, 3D.