Add export to word action docs

Co-authored-by: Fu-Jie <33599649+Fu-Jie@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-30 07:25:12 +00:00
parent 56dfb4c01c
commit 4d43c4fb5e
7 changed files with 164 additions and 0 deletions

View File

@@ -0,0 +1,70 @@
# Export to Word
<span class="category-badge action">Action</span>
<span class="version-badge">v0.1.0</span>
Export chat conversations to Word (.docx) with Markdown formatting, syntax highlighting, and smarter filenames.
---
## Overview
The Export to Word plugin converts chat messages from Markdown to a polished Word document. It handles headings, lists, tables, code blocks, and blockquotes while keeping both English and Chinese text rendering clean.
## Features
- :material-file-word-box: **DOCX Export**: Generate Word files with one click
- :material-format-bold: **Rich Markdown Support**: Headings, bold/italic, lists, tables
- :material-code-tags: **Syntax Highlighting**: Pygments-powered code blocks
- :material-format-quote-close: **Styled Blockquotes**: Left-border gray quote styling
- :material-file-document-outline: **Smart Filenames**: Prefers chat title → Markdown title → user/date
---
## Installation
1. Download the plugin file: [`export_to_word.py`](https://github.com/Fu-Jie/awesome-openwebui/tree/main/plugins/actions/export_to_docx)
2. Upload to OpenWebUI: **Admin Panel****Settings****Functions**
3. Enable the plugin
---
## Usage
1. Open the conversation you want to export
2. Click the **Export to Word** button in the message action bar
3. The `.docx` file will download automatically
---
## Supported Markdown
| Syntax | Word Result |
| :---------------------------------- | :-------------------------------- |
| `# Heading 1` to `###### Heading 6` | Heading levels 1-6 |
| `**bold**` / `__bold__` | Bold text |
| `*italic*` / `_italic_` | Italic text |
| `***bold italic***` | Bold + Italic |
| `` `inline code` `` | Monospace with gray background |
| <code>``` code block ```</code> | Syntax-highlighted code block |
| `> blockquote` | Left-bordered gray italic text |
| `[link](url)` | Blue underlined link |
| `~~strikethrough~~` | Strikethrough |
| `- item` / `* item` | Bullet list |
| `1. item` | Numbered list |
| Markdown tables | Grid table |
| `---` / `***` | Horizontal rule |
---
## Requirements
!!! note "Prerequisites"
- `python-docx==1.1.2` (document generation)
- `Pygments>=2.15.0` (syntax highlighting, optional but recommended)
---
## Source Code
[:fontawesome-brands-github: View on GitHub](https://github.com/Fu-Jie/awesome-openwebui/tree/main/plugins/actions/export_to_docx){ .md-button }

View File

@@ -0,0 +1,70 @@
# Export to Word导出为 Word
<span class="category-badge action">Action</span>
<span class="version-badge">v0.1.0</span>
将聊天记录按 Markdown 格式导出为 Word (.docx),支持语法高亮、引用样式和更智能的文件命名。
---
## 概览
Export to Word 插件会把聊天消息从 Markdown 转成精致的 Word 文档。它完整支持标题、列表、表格、代码块和引用,同时兼顾中英文显示效果。
## 功能特性
- :material-file-word-box: **DOCX 导出**:一键生成 Word 文件
- :material-format-bold: **丰富 Markdown 支持**:标题、粗斜体、列表、表格
- :material-code-tags: **语法高亮**Pygments 驱动的代码块上色
- :material-format-quote-close: **引用样式**:左侧边框的灰色斜体引用
- :material-file-document-outline: **智能文件名**:优先对话标题 → Markdown 标题 → 用户/日期
---
## 安装
1. 下载插件文件:[`export_to_word.py`](https://github.com/Fu-Jie/awesome-openwebui/tree/main/plugins/actions/export_to_docx)
2. 上传到 OpenWebUI**Admin Panel** → **Settings****Functions**
3. 启用插件
---
## 使用方法
1. 打开想要导出的对话
2. 点击消息操作栏的 **Export to Word** 按钮
3. `.docx` 文件会自动下载
---
## 支持的 Markdown
| 语法 | Word 效果 |
| :---------------------------------- | :-------------------------------- |
| `# 标题1``###### 标题6` | 标题级别 1-6 |
| `**粗体**` / `__粗体__` | 粗体文本 |
| `*斜体*` / `_斜体_` | 斜体文本 |
| `***粗斜体***` | 粗体 + 斜体 |
| `` `行内代码` `` | 等宽字体 + 灰色背景 |
| <code>``` 代码块 ```</code> | 语法高亮代码块 |
| `> 引用文本` | 左侧边框的灰色斜体 |
| `[链接](url)` | 蓝色下划线链接 |
| `~~删除线~~` | 删除线 |
| `- 项目` / `* 项目` | 无序列表 |
| `1. 项目` | 有序列表 |
| Markdown 表格 | 带边框表格 |
| `---` / `***` | 水平分割线 |
---
## 运行要求
!!! note "前置条件"
- `python-docx==1.1.2`(文档生成)
- `Pygments>=2.15.0`(语法高亮,建议安装)
---
## 源码
[:fontawesome-brands-github: 在 GitHub 查看](https://github.com/Fu-Jie/awesome-openwebui/tree/main/plugins/actions/export_to_docx){ .md-button }

View File

@@ -57,6 +57,16 @@ Actions are interactive plugins that:
[:octicons-arrow-right-24: Documentation](export-to-excel.md)
- :material-file-word-box:{ .lg .middle } **Export to Word**
---
Export chat content as Word (.docx) with Markdown formatting and syntax highlighting.
**Version:** 0.1.0
[:octicons-arrow-right-24: Documentation](export-to-word.md)
- :material-text-box-search:{ .lg .middle } **Summary**
---

View File

@@ -57,6 +57,16 @@ Actions 是交互式插件,能够:
[:octicons-arrow-right-24: 查看文档](export-to-excel.md)
- :material-file-word-box:{ .lg .middle } **Export to Word**
---
将聊天内容按 Markdown 格式导出为 Word (.docx),支持语法高亮。
**版本:** 0.1.0
[:octicons-arrow-right-24: 查看文档](export-to-word.md)
- :material-text-box-search:{ .lg .middle } **Summary**
---

View File

@@ -52,6 +52,7 @@ OpenWebUI supports four types of plugins, each serving a different purpose:
| [Smart Infographic](actions/smart-infographic.md) | Action | Transform text into professional infographics | 1.0.0 |
| [Knowledge Card](actions/knowledge-card.md) | Action | Create beautiful learning flashcards | 0.2.0 |
| [Export to Excel](actions/export-to-excel.md) | Action | Export chat history to Excel files | 1.0.0 |
| [Export to Word](actions/export-to-word.md) | Action | Export chat content to Word (.docx) with formatting | 0.1.0 |
| [Summary](actions/summary.md) | Action | Text summarization tool | 1.0.0 |
| [Async Context Compression](filters/async-context-compression.md) | Filter | Intelligent context compression | 1.0.0 |
| [Context Enhancement](filters/context-enhancement.md) | Filter | Enhance chat context | 1.0.0 |

View File

@@ -52,6 +52,7 @@ OpenWebUI 支持四种类型的插件,每种都有不同的用途:
| [Smart Infographic智能信息图](actions/smart-infographic.md) | Action | 将文本转成专业信息图 | 1.0.0 |
| [Knowledge Card知识卡片](actions/knowledge-card.md) | Action | 生成精美学习卡片 | 0.2.0 |
| [Export to Excel导出到 Excel](actions/export-to-excel.md) | Action | 导出聊天记录为 Excel | 1.0.0 |
| [Export to Word导出为 Word](actions/export-to-word.md) | Action | 将聊天内容导出为 Word (.docx) 并保留格式 | 0.1.0 |
| [Summary摘要](actions/summary.md) | Action | 文本摘要工具 | 1.0.0 |
| [Async Context Compression异步上下文压缩](filters/async-context-compression.md) | Filter | 智能上下文压缩 | 1.0.0 |
| [Context Enhancement上下文增强](filters/context-enhancement.md) | Filter | 提升对话上下文 | 1.0.0 |

View File

@@ -99,6 +99,7 @@ plugins:
Smart Infographic: 智能信息图
Knowledge Card: 知识卡片
Export to Excel: 导出到 Excel
Export to Word: 导出为 Word
Summary: 摘要
Async Context Compression: 异步上下文压缩
Context Enhancement: 上下文增强
@@ -185,6 +186,7 @@ nav:
- Smart Infographic: plugins/actions/smart-infographic.md
- Knowledge Card: plugins/actions/knowledge-card.md
- Export to Excel: plugins/actions/export-to-excel.md
- Export to Word: plugins/actions/export-to-word.md
- Summary: plugins/actions/summary.md
- Filters:
- plugins/filters/index.md