Python DOCX Document Creator
Paste the following prompt into your AI chat to install this skill:
Please install @user_e60b9cd9/python-docx-creator following https://skillhub.cn/install/skillhub.md.
About this skill
Problem
Automated workflows often emit Markdown or plain text, but recipients may need an editable .docx. Manual copy-and-paste can lose heading hierarchy, lists, and emphasis, while repeating it for many documents is tedious. python-docx-creator targets that gap by turning structured text into a Word document programmatically.
How It Works
The skill is built around scripts/create_docx.py. Input can be a Markdown file path or inline text; the .docx output path is required. The script recognizes #, ##, and ### headings, unordered and ordered lists, **bold**, *italic*, and normal paragraphs, then writes them into a Word document. A typical run prepares UTF-8 content, invokes the script, and validates the output. This fits cases such as saving an assistant answer to Word or generating several documents in a batch.
Boundaries
The current version covers basic rich text only. Tables, images, headers, and footers are not supported. The output directory must be writable, and unusual input structures may still need manual cleanup. More advanced formatting can be added by extending create_docx.py with doc.add_table(), doc.add_picture(), or style configuration.
Use Cases
- Save an assistant answer formatted as Markdown into an editable Word document.
- Generate multiple `.docx` files with headings, lists, and bold text from plain answers.
- Convert Markdown technical notes into Word for review or archival.
- Read text content in a script and output Word files with basic formatting.
Best For
- Python engineers who need to deliver AI output as Word files.
- Technical writers who regularly turn Markdown notes into editable documents.
- Script maintainers generating multiple basic `.docx` files in automation.
- Product or operations staff who need structured answers saved for non-technical reviewers.
Related Skills
Generates a fixed-structure A-share tech daily across five tracks, screening 24-hour news and selecting leader and growth stocks.
Convert teaching schedules from talent development plan PDFs into structured Excel files, with cross-page tables, merged cells, multi-semester course splitting, major metadata extraction, and batch output.
Turn post-meeting text into bilingual minutes, preserving structure and consistent terminology.
Interprets tender files, generates bid docs, and checks compliance via the Bailian API.