## File: README.md

# PasteMD










## ❤️ 赞助商


| [](https://www.atlascloud.ai/?utm_source=github&utm_medium=link&utm_campaign=pasteMD) | [Atlas Cloud](https://www.atlascloud.ai/?utm_source=github&utm_medium=link&utm_campaign=pasteMD) 是一个全模态 AI 推理平台，为开发者提供单一 AI API，用于访问视频生成、图像生成和 LLM API。无需管理多个供应商集成，接入一次即可统一访问覆盖所有模态的 300+ 精选模型。
  查看 Atlas Cloud 新的 Coding Plan 推广，获得更具预算友好性的 API 访问：[https://www.atlascloud.ai/console/coding-plan](https://www.atlascloud.ai/console/coding-plan) |
| --- | --- |




> 在写论文或报告时，从 ChatGPT / DeepSeek 等 AI 网站中复制出来的公式在 Word 里总是乱码？Markdown 表格复制到 Excel 总是不行？**PasteMD 就是为了解决这个问题而生的，嘿嘿**
> 
> 

一个常驻托盘的小工具：
从 **剪贴板读取 Markdown**，调用 **Pandoc** 转换为 DOCX，并自动插入到 **Word/WPS** 光标位置。

**✨ 功能**：智能识别 Markdown 表格，一键粘贴到 **Excel**！

**✨ 功能**：智能识别 HTML富文本，方便直接复制网页上的ai回复，一键粘贴到 **Word/WPS**！

**✨ 新功能**：应用扩展（HTML+Markdown/HTML/Markdown/LaTeX/文件粘贴），可按应用/窗口标题匹配（如语雀/QQ等）。

**✨ 新功能**：转换增强：支持按转换类型配置 Pandoc Filters；自动修复部分 LaTeX 语法与单 `$...$` 公式块。

---

## 功能特点

### 演示效果

#### Markdown → Word/WPS



#### 复制网页中的ai回复 → Word/WPS


#### Markdown 表格 → Excel


#### 设置格式



* 全局热键（默认 `Ctrl+Shift+B`）一键粘贴 Markdown → DOCX。
* **✨ 智能识别 Markdown 表格**，自动粘贴到 Excel。
* **✨ 应用扩展**：为不同应用配置 HTML+Markdown/HTML/Markdown/LaTeX/文件 粘贴模式，支持按窗口标题匹配。
* **✨ 转换增强**：按转换类型添加 Pandoc Filters，自动修复部分 LaTeX 语法与单 `$...$` 公式块。
* 自动识别当前前台应用：Word 或 WPS。
* 智能打开所需应用为Word/Excel。
* 托盘菜单，可保留文件、查看日志/配置等。
* 支持系统通知提醒。
* 无黑框，无阻塞，稳定运行。

---

## 📊 AI 网站兼容性测试

以下是主流 AI 对话网站的复制粘贴兼容性测试结果：

| AI 网站 | 复制 Markdown（无公式） | 复制 Markdown（含公式） | 复制网页内容（无公式） | 复制网页内容（含公式） |
|---------|:----------------------------:|:----------------------------:|:---------------------------:|:---------------------------:|
| **Kimi** | ✅ 完美支持 | ✅ 完美支持 | ✅ 完美支持 | ⚠️ 无法显示公式 |
| **DeepSeek** | ✅ 完美支持 | ✅ 完美支持 | ✅ 完美支持 | ✅ 完美支持 |
| **通义千问** | ✅ 完美支持 | ✅ 完美支持 | ✅ 完美支持 | ⚠️ 无法显示公式 |
| **豆包\*** | ✅ 完美支持 | ✅ 完美支持 | ✅ 完美支持 | ✅ 完美支持 |
| **智谱清言/ChatGLM** | ✅ 完美支持 | ✅ 完美支持 | ✅ 完美支持 | ✅ 完美支持 |
| **ChatGPT** | ✅ 完美支持 | ⚠️ 公式显示为代码 | ✅ 完美支持 | ✅ 完美支持 |
| **Gemini** | ✅ 完美支持 | ✅ 完美支持 | ✅ 完美支持 | ✅ 完美支持 |
| **Grok** | ✅ 完美支持 | ✅ 完美支持 | ✅ 完美支持 | ✅ 完美支持 |
| **Claude** | ✅ 完美支持 | ✅ 完美支持 | ✅ 完美支持 | ✅ 完美支持 |

**图例说明：**
- ✅ **完美支持**：格式、样式、公式会均正确显示
- ⚠️ **公式显示为代码**：数学公式会以 LaTeX 代码形式显示，需在 Word/WPS 中手动使用公式编辑器
- ⚠️ **无法显示公式**：数学公式会丢失，需在 Word/WPS 中手动使用公式编辑器，自行输入公式内容
- **豆包**：复制网页内容（含公式）前，需要在浏览器中开启“允许读取剪贴板”权限，可在 URL 地址栏左侧的图标中进行设置

**测试说明：**
1. **复制 Markdown**：点击 AI 回复中的"复制"按钮（通常复制的是 Markdown 格式，但是部分网站也会携带上html）
2. **复制网页内容**：直接选中 AI 回复内容进行复制（复制的是 HTML 富文本）

---

## 🚀使用方法

1. 下载可执行文件（[Releases 页面](https://github.com/RICHQAQ/PasteMD/releases/)）：

   * ~~**PasteMD\_vx.x.x.exe**：**便携版**，需要你本机已经安装好 **Pandoc** 并能在命令行运行。
   若未安装，请到 [Pandoc 官网](https://pandoc.org/installing.html) 下载安装即可。~~ （不再提供，需要请自行编译）
   * **PasteMD\_pandoc-Setup.exe**：**一体化安装包**，自带 Pandoc，不需要另外配置环境。

2. 打开 Word、WPS 或 Excel，光标放在需要插入的位置。

3. 复制 **Markdown** 或者 **网页内容** 到剪贴板，按下热键 **Ctrl+Shift+B**。

4. 转换结果会自动插入到文档中：
   - **Markdown 表格** → 自动粘贴到 Excel（如果 Excel 已打开）
   - **普通 Markdown**/**网页内容** → 转换为 DOCX 并插入 Word/WPS

5. 右下角会提示成功/失败。

---

## ⚙️配置

首次运行会在用户数据目录生成 `config.json`（Windows：`%APPDATA%\\PasteMD\\config.json`， MacOS: `~/Library/Application Support/PasteMD/config.json`），可手动编辑：

```json
{
  "hotkey": "<ctrl>+<shift>+b",
  "pandoc_path": "pandoc",
  "reference_docx": null,
  "save_dir": "%USERPROFILE%\\Documents\\pastemd",
  "keep_file": false,
  "notify": true,
  "startup_notify": true,
  "enable_excel": true,
  "excel_keep_format": true,
  "paste_delay_s": 0.3,
  "no_app_action": "open",
  "md_disable_first_para_indent": true,
  "html_disable_first_para_indent": true,
  "html_formatting": {
    "strikethrough_to_del": true
  },
  "move_cursor_to_end": true,
  "Keep_original_formula": false,
  "enable_latex_replacements": true,
  "fix_single_dollar_block": true,
  "language": "zh-CN",
  "pandoc_request_headers": [
    "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
  ],
  "pandoc_filters": [],
  "pandoc_filters_by_conversion": {
    "md_to_docx": [],
    "html_to_docx": [],
    "html_to_md": [],
    "md_to_html": [],
    "md_to_rtf": [],
    "md_to_latex": []
  },
  "extensible_workflows": {
    "html": {
      "enabled": true,
      "apps": [],
      "keep_formula_latex": true
    },
    "md": {
      "enabled": true,
      "apps": [],
      "html_formatting": {
        "css_font_to_semantic": true,
        "bold_first_row_to_header": true
      }
    },
    "latex": {
      "enabled": true,
      "apps": []
    },
    "file": {
      "enabled": true,
      "apps": []
    }
  }
}
```

字段说明：

* `hotkey`：全局热键，语法如 `<ctrl>+<alt>+v`。
* `pandoc_path`：Pandoc 可执行文件路径。
* `reference_docx`：Pandoc 参考模板（可选）。
* `save_dir`：保留文件时的保存目录。
* `keep_file`：是否保留生成的 DOCX 文件。
* `notify`：是否显示系统通知。
* `startup_notify`：启动时是否显示提示通知。
* **`enable_excel`**： - 是否启用智能识别 Markdown 表格并粘贴到 Excel（默认 true）。
* **`excel_keep_format`**： - Excel 粘贴时是否保留 Markdown 格式（粗体、斜体、代码等），默认 true。
* `paste_delay_s`：粘贴前的延迟秒数（win有的时候写入剪切板需要一点点时间）。
* **`no_app_action`**： 当未检测到目标应用（如 Word/Excel）时的默认动作（默认 `"open"`）。可选值：`open`=自动打开、`save`=仅保存、`clipboard`=复制文件到剪贴板、`none`=无操作。
* **`md_disable_first_para_indent`**： - Markdown 转换时是否禁用第一段的特殊格式，统一为正文样式（默认 true）。
* **`html_formatting`**： - HTML 富文本转换时的格式化选项。
  * **`strikethrough_to_del`**： - 是否将删除线 ~~ 转换为 `<del>` 标签，使得转换正确（默认 true）。
* **`html_disable_first_para_indent`**： - HTML 富文本转换时是否禁用第一段的特殊格式，统一为正文样式（默认 true）。
* **`move_cursor_to_end`**： - 插入内容后是否将光标移动到插入内容的末尾（默认 true）。
* **`Keep_original_formula`**： - 是否保留原始数学公式（LaTeX 代码形式）。
* `enable_latex_replacements`：自动修复部分不兼容的 LaTeX 语法（例如将 `{\\kern 10pt}` 替换为 `\\qquad`）。
* `fix_single_dollar_block`：自动识别并修复单独一行的 `$ ... $` 公式块（转换为 `$$ ... $$`）。
* `language`：界面语言，`zh-CN` 简体中文，`en-US` 英文，`ja-JP` 日语。
* `pandoc_request_headers`：Pandoc 下载远程资源时附加的请求头（每行一个 `Header: Value`）。
* **`pandoc_filters`**： - 自定义 Pandoc Filter 列表。可添加 `.lua` 脚本或可执行文件路径，Filter 将按照列表顺序依次执行。用于扩展 Pandoc 转换功能，如自定义格式处理、特殊语法转换等。默认为空列表。示例：`["%APPDATA%\\npm\\mermaid-filter.cmd"]` 可实现 Mermaid 图表支持。
* `pandoc_filters_by_conversion`：按转换类型配置 Filters（如 `md_to_docx`、`html_to_md` 等）。
* `extensible_workflows`：应用扩展配置（按应用/窗口标题匹配不同粘贴模式），详情见下文。

修改后可在托盘菜单选择 **“重载配置/热键”** 立即生效。

---

## 🔧 高级功能：自定义 Pandoc Filters

### 什么是 Pandoc Filter？

Pandoc Filter 是在文档转换过程中对内容进行自定义处理的插件程序。PasteMD 支持配置多个 Filter，按顺序依次处理文档内容，实现扩展功能。

### 使用场景示例：Mermaid 图表支持

如果您想在 Markdown 中使用 Mermaid 图表并正确转换到 Word，可以使用 [mermaid-filter](https://github.com/raghur/mermaid-filter)。

**1. 安装 mermaid-filter**

```bash
npm install mermaid-filter
```

*前置条件：需要先安装 [Node.js](https://nodejs.org/)*


⚠️ **故障排除：Chrome 下载失败**

安装 mermaid-filter 时需要下载 Chromium 浏览器。如果自动下载失败，可以手动下载：

**步骤 1：查找所需的 Chromium 版本号**

查看文件：`%APPDATA%\npm\node_modules\mermaid-filter\node_modules\puppeteer-core\lib\cjs\puppeteer\revisions.d.ts`

找到类似以下内容：
```typescript
chromium: "1108766";
```

或在报错信息里，如：
```bash
npm error Error: Download failed: server returned code 502. URL: https://npmmirror.com/mirrors/chromium-browser-snapshots/Win_x64/1108766/chrome-win.zip
```
找到类似 `Win_x64/1108766` 的版本号。

记下这个版本号（例如：`1108766`）。

**步骤 2：下载 Chromium**

根据上一步获取的版本号，下载对应的 Chromium：

```
https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1108766/chrome-win.zip
```

（将 URL 中的 `1108766` 替换为你查到的版本号）

**步骤 3：解压到指定目录**

将下载的 `chrome-win.zip` 解压到以下目录：

```
%USERPROFILE%\.cache\puppeteer\chrome\win64-1108766\chrome-win
```

（目录中的 `1108766` 也需要替换为你的版本号）

解压后，应该有 `chrome.exe` 位于：  
`%USERPROFILE%\.cache\puppeteer\chrome\win64-1108766\chrome-win\chrome.exe`



**2. 配置到 PasteMD**

方式一：通过设置界面
- 打开 PasteMD 设置 → 转换选项卡 → Pandoc Filters
- 点击「添加...」按钮
- 选择 Filter 文件：`%APPDATA%\npm\mermaid-filter.cmd`
- 保存设置

方式二：编辑配置文件
```json
{
  "pandoc_filters": [
    "%APPDATA%\\npm\\mermaid-filter.cmd"
  ]
}
```

**3. 测试效果**

复制以下 Markdown 内容并使用 PasteMD 转换：

~~~markdown
```mermaid
graph LR
    A[开始] --> B[处理]
    B --> C[结束]
```
~~~

Mermaid 图表将被渲染为图片并插入到 Word 文档中。

### 更多 Filter 资源

- [Pandoc Filters 官方列表](https://github.com/jgm/pandoc/wiki/Pandoc-Filters)
- [Lua Filters 文档](https://pandoc.org/lua-filters.html)

---

## 🧩 应用扩展（自定义粘贴工作流）

设置 → **应用扩展** 中可以为不同应用配置粘贴模式，支持按窗口标题正则匹配：

* **HTML** / **Markdown** / **LaTeX** / **文件**：按目标应用选择最合适的粘贴方式
  - HTML、Markdown 适合语雀等富文本笔记软件
  - LaTeX 适合overleaf等学术网站
  - 文件 适合QQ、微信等作为附件粘贴的应用

> 提示：同一个应用只建议配置一种工作流（避免冲突）；需要区分窗口标题时可使用“窗口名称匹配”。

示例配置（节选）：

> Windows 下 `id` 通常为应用的 exe 路径；macOS 为应用的 bundle id（建议通过设置界面添加，自动填充）。

```json
{
  "extensible_workflows": {
    "html": {
      "enabled": true,
      "apps": [
        {
          "name": "语雀",
          "id": "/path/语雀.exe",
          "window_patterns": []
        }
      ],
      "keep_formula_latex": true
    },
    "latex": {
      "enabled": true,
      "apps": [
        {
          "name": "chrome",
          "id": "/path/chrome.exe",
          "window_patterns": [
            ".*overleaf.*"
          ]
        }
      ]
    },
    "file": {
      "enabled": true,
      "apps": [
        {
          "name": "QQ",
          "id": "/path/qq.exe",
          "window_patterns": []
        }
      ]
    }
  }
}
```

---

## 托盘菜单

* 快捷显示：当前全局热键（只读）。
* 启用热键：开/关全局热键。
* 弹窗通知：开/关系统通知。
* 无应用时动作：当未检测到 Word/WPS/Excel 时的默认动作（自动打开/仅保存/复制到剪贴板/无操作）。
* 插入后移动光标到末尾：插入内容后是否将光标移动到插入内容的末尾。
* HTML 格式化：切换 **删除线 ~~ 转换为 `<del>`** 等 HTML 自动整理，使得可以正确转换（防止部分网页没有解析这些格式，导致从网页复制粘贴无法显示这些格式）。
* 设置热键：通过图形界面录制并保存新的全局热键（即时生效）。
* 保留生成文件：勾选后生成的 DOCX 会保存在 `save_dir`。
* 打开保存目录、查看日志、编辑配置、重载配置/热键。
* 版本：显示当前版本；可检查更新；若检测到新版本，会显示条目并可点击打开下载页面。
* 退出：退出程序。

---

## 📦从源码运行 / 打包

建议 Python 3.12 (64位)。

```bash
pip install -r requirements.txt
python main.py
```

使用 PyInstaller：

```bash
pyinstaller --clean -F -w -n PasteMD
  --icon assets\icons\logo.ico
  --add-data "assets\icons;assets\icons"
  --add-data "pastemd\i18n\locales\*.json;pastemd\i18n\locales"
  --add-data "pastemd\lua;pastemd\lua"
  --hidden-import plyer.platforms.win.notification
  main.py
```

生成的程序在 `dist/PasteMD.exe`。

---

## ⭐ Star 

感谢每一位 Star 的帮助，欢迎分享给更多小伙伴~，想要达成4096 star🌟，我会努力的喵



[](https://star-history.dera.page/#RICHQAQ/PasteMD&type=date&legend=top-left)

## 🍵支持与打赏

如果有什么想法和好建议，欢迎issue交流！🤯🤯🤯


也欢迎加入 **PasteMD使用交流群** 与其他用户交流：


希望这个小工具对你有帮助，欢迎请作者👻喝杯咖啡☕，也欢迎来我小店看看哦～你的支持会让我更有动力持续修复问题、完善功能、适配更多场景并保持长期维护。感谢每一份支持！
     
🌟**我的小店**：欢迎光临，不定期上架好物～ [点击前往](https://pay.ldxp.cn/shop/S1024F64)




| 支付宝 | 微信 |
| --- | --- |
|  |  |


---

## License

This project is licensed under the [GNU Affero General Public License v3.0](LICENSE).
Third-party licenses are listed in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).

---

## File: docs/md/README.en.md

# PasteMD









## ❤️ Sponsors


| [](https://www.atlascloud.ai/?utm_source=github&utm_medium=link&utm_campaign=pasteMD) | [Atlas Cloud](https://www.atlascloud.ai/?utm_source=github&utm_medium=link&utm_campaign=pasteMD) is a full-modal AI inference platform that gives developers a single AI API to access video generation, image generation, and LLM APIs. Instead of managing multiple vendor integrations, you connect once and get unified access to 300+ curated models across all modalities.
  Check out Atlas Cloud's new coding plan promotion for more budget-friendly API access: [https://www.atlascloud.ai/console/coding-plan](https://www.atlascloud.ai/console/coding-plan) |
| --- | --- |




> When writing papers or reports, do formulas copied from AI tools (like ChatGPT or DeepSeek) turn into garbled text in Word? Do Markdown tables fail to paste correctly into Excel? **PasteMD was built specifically to solve these problems.**
> 
> 

A lightweight tray app:
Reads **Markdown from the clipboard**, converts it to DOCX with **Pandoc**, and inserts it at the caret position in **Word/WPS**.

**✨ Feature**: Smart Markdown table detection, one-click paste to **Excel**!

**✨ Feature**: Smart HTML rich text detection, easy one-click paste of AI replies from the web into **Word/WPS**!

**✨ New feature**: App extensions (HTML+Markdown/HTML/Markdown/LaTeX/File paste), match by app/window title (e.g., Yuque/QQ).

**✨ New feature**: Conversion enhancements: configure Pandoc Filters by conversion type; auto-fix some LaTeX syntax and standalone `$...$` formula blocks.

---

## Feature Highlights

### Demo Videos

#### Markdown → Word/WPS



#### Copy AI web reply → Word/WPS


#### Markdown tables → Excel


#### Apply formatting presets



* Global hotkey (default `Ctrl+Shift+B`) to paste Markdown → DOCX with one key.
* **✨ Smart Markdown table detection** and paste into Excel.
* **✨ App extensions**: configure HTML+Markdown/HTML/Markdown/LaTeX/File paste modes per app, with window-title matching.
* **✨ Conversion enhancements**: add Pandoc Filters by conversion type, auto-fix some LaTeX syntax and standalone `$...$` formula blocks.
* Auto-detect the active app: Word or WPS.
* Smartly open the required app (Word/Excel).
* Tray menu: keep files, view logs/config, etc.
* System notifications.
* No console window, non-blocking, stable.

---

## 📊 AI Website Compatibility

The following table summarizes compatibility when copying content from major AI chat sites:

| AI Service | Copy Markdown (no formulas) | Copy Markdown (with formulas) | Copy page content (no formulas) | Copy page content (with formulas) |
|---------|:----------------------------:|:----------------------------:|:---------------------------:|:---------------------------:|
| **Kimi** | ✅ Perfect | ✅ Perfect | ✅ Perfect | ⚠️ Formulas missing |
| **DeepSeek** | ✅ Perfect | ✅ Perfect | ✅ Perfect | ✅ Perfect |
| **Tongyi Qianwen** | ✅ Perfect | ✅ Perfect | ✅ Perfect | ⚠️ Formulas missing |
| **Doubao\*** | ✅ Perfect | ✅ Perfect | ✅ Perfect | ✅ Perfect |
| **Zhipu Qingyan/ChatGLM** | ✅ Perfect | ✅ Perfect | ✅ Perfect | ✅ Perfect |
| **ChatGPT** | ✅ Perfect | ⚠️ Rendered as code | ✅ Perfect | ✅ Perfect |
| **Gemini** | ✅ Perfect | ✅ Perfect | ✅ Perfect | ✅ Perfect |
| **Grok** | ✅ Perfect | ✅ Perfect | ✅ Perfect | ✅ Perfect |
| **Claude** | ✅ Perfect | ✅ Perfect | ✅ Perfect | ✅ Perfect |

**Legend:**
- ✅ **Perfect**: formatting, style, and formulas are displayed correctly
- ⚠️ **Rendered as code**: formulas appear as LaTeX code; use Word/WPS equation editor to fix
- ⚠️ **Formulas missing**: formulas are removed; re-enter them with the equation editor
- **Doubao**: before copying web content (with formulas), enable “Allow clipboard read” in the browser (via the icon left of the URL)

**Test method:**
1. **Copy Markdown**: click the “Copy” button in an AI reply (usually Markdown, some sites include HTML)
2. **Copy page content**: select the AI reply content directly and copy (HTML rich text)

---

## 🚀 Getting Started

1. Download an executable from the [Releases page](https://github.com/RICHQAQ/PasteMD/releases/):

   * ~~**PasteMD_vx.x.x.exe** — **portable build**; requires Pandoc installed and available in command line. If not installed, download from the [Pandoc website](https://pandoc.org/installing.html).~~ (No longer provided. Build from source if needed.)
   * **PasteMD_pandoc-Setup.exe** — **all-in-one installer** bundled with Pandoc.

2. Open Word, WPS, or Excel and place the caret where you want to insert.

3. Copy **Markdown** or **web content** into the clipboard, then press **Ctrl+Shift+B**.

4. The result will be inserted automatically:
   - **Markdown tables** → paste into Excel automatically (if Excel is open)
   - **Regular Markdown/web content** → convert to DOCX and insert into Word/WPS

5. A success/failure notification appears at the bottom right.

---

## ⚙️ Configuration

The first run creates `config.json` in the user data directory (Windows: `%APPDATA%\\PasteMD\\config.json`, MacOS: `~/Library/Application Support/PasteMD/config.json`). You can edit it manually:

```json
{
  "hotkey": "<ctrl>+<shift>+b",
  "pandoc_path": "pandoc",
  "reference_docx": null,
  "save_dir": "%USERPROFILE%\\Documents\\pastemd",
  "keep_file": false,
  "notify": true,
  "startup_notify": true,
  "enable_excel": true,
  "excel_keep_format": true,
  "paste_delay_s": 0.3,
  "no_app_action": "open",
  "md_disable_first_para_indent": true,
  "html_disable_first_para_indent": true,
  "html_formatting": {
    "strikethrough_to_del": true
  },
  "move_cursor_to_end": true,
  "Keep_original_formula": false,
  "enable_latex_replacements": true,
  "fix_single_dollar_block": true,
  "language": "zh-CN",
  "pandoc_request_headers": [
    "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
  ],
  "pandoc_filters": [],
  "pandoc_filters_by_conversion": {
    "md_to_docx": [],
    "html_to_docx": [],
    "html_to_md": [],
    "md_to_html": [],
    "md_to_rtf": [],
    "md_to_latex": []
  },
  "extensible_workflows": {
    "html": {
      "enabled": true,
      "apps": [],
      "keep_formula_latex": true
    },
    "md": {
      "enabled": true,
      "apps": [],
      "html_formatting": {
        "css_font_to_semantic": true,
        "bold_first_row_to_header": true
      }
    },
    "latex": {
      "enabled": true,
      "apps": []
    },
    "file": {
      "enabled": true,
      "apps": []
    }
  }
}
```

Fields:

* `hotkey`: global hotkey syntax, e.g. `<ctrl>+<alt>+v`.
* `pandoc_path`: Pandoc executable path.
* `reference_docx`: optional Pandoc reference template.
* `save_dir`: output directory when keeping files.
* `keep_file`: keep generated DOCX files or delete them.
* `notify`: show system notifications.
* `startup_notify`: show a notification on startup.
* **`enable_excel`**: enable smart Markdown table detection and paste into Excel (default true).
* **`excel_keep_format`**: keep Markdown formatting (bold/italic/code, etc.) when pasting into Excel (default true).
* `paste_delay_s`: delay in seconds before pasting (Windows may need a short delay for clipboard updates).
* **`no_app_action`**: default action when no target app (Word/Excel) is detected (default `"open"`). Options: `open`=auto open, `save`=save only, `clipboard`=copy file to clipboard, `none`=no action.
* **`md_disable_first_para_indent`**: disable special formatting for the first paragraph when converting Markdown (default true).
* **`html_formatting`**: formatting options for HTML rich text conversion.
  * **`strikethrough_to_del`**: convert ~~ strikethrough to `<del>` for correct rendering (default true).
* **`html_disable_first_para_indent`**: disable special formatting for the first paragraph when converting HTML rich text (default true).
* **`move_cursor_to_end`**: move the caret to the end after inserting (default true).
* **`Keep_original_formula`**: keep original math formulas (LaTeX code form).
* `enable_latex_replacements`: auto-fix some incompatible LaTeX syntax (e.g. replace `{\\kern 10pt}` with `\\qquad`).
* `fix_single_dollar_block`: auto-detect and fix standalone `$ ... $` formula blocks (convert to `$$ ... $$`).
* `language`: UI language. `zh-CN` (Simplified Chinese), `en-US` (English), `ja-JP` (Japanese).
* `pandoc_request_headers`: request headers for Pandoc when downloading remote resources (one `Header: Value` per line).
* **`pandoc_filters`**: custom Pandoc Filter list. Add `.lua` scripts or executable paths; filters run in list order. Extends conversion functions (custom formatting, special syntax transforms, etc.). Default empty. Example: `["%APPDATA%\\npm\\mermaid-filter.cmd"]` enables Mermaid diagrams.
* `pandoc_filters_by_conversion`: configure Filters per conversion type (e.g. `md_to_docx`, `html_to_md`, etc.).
* `extensible_workflows`: app extension settings (match by app/window title and choose paste mode). See below.

Apply changes via the tray menu **“Reload config/hotkey”**.

---

## 🔧 Advanced: Custom Pandoc Filters

### What are Pandoc Filters?

Pandoc Filters are plugin programs that process content during conversion. PasteMD supports configuring multiple filters that execute sequentially to extend functionality.

### Use Case Example: Mermaid Diagram Support

To use Mermaid diagrams in Markdown and convert them properly to Word, you can use [mermaid-filter](https://github.com/raghur/mermaid-filter).

**1. Install mermaid-filter**

```bash
npm install mermaid-filter
```

*Prerequisite: [Node.js](https://nodejs.org/) must be installed*


⚠️ **Troubleshooting: Chrome Download Failure**

Installing mermaid-filter requires downloading Chromium. If automatic download fails, you can download it manually:

**Step 1: Find Required Chromium Version**

Check the file: `%APPDATA%\npm\node_modules\mermaid-filter\node_modules\puppeteer-core\lib\cjs\puppeteer\revisions.d.ts`

Find content like:
```typescript
chromium: "1108766";
```
Or in the error message, e.g.:
```bash
npm error Error: Download failed: server returned code 502. URL: https://npmmirror.com/mirrors/chromium-browser-snapshots/Win_x64/1108766/chrome-win.zip
```
Find version like `Win_x64/1108766`.

Note down this version number (e.g., `1108766`).

**Step 2: Download Chromium**

Based on the version number from Step 1, download the corresponding Chromium:

```
https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1108766/chrome-win.zip
```

(Replace `1108766` in the URL with your version number)

**Step 3: Extract to Designated Directory**

Extract the downloaded `chrome-win.zip` to:

```
%USERPROFILE%\.cache\puppeteer\chrome\win64-1108766\chrome-win
```

(Replace `1108766` in the path with your version number)

After extraction, `chrome.exe` should be located at:  
`%USERPROFILE%\.cache\puppeteer\chrome\win64-1108766\chrome-win\chrome.exe`



**2. Configure in PasteMD**

Option 1: Via Settings UI
- Open PasteMD Settings → Conversion Tab → Pandoc Filters
- Click "Add..." button
- Select filter file: `%APPDATA%\npm\mermaid-filter.cmd`
- Save settings

Option 2: Edit config file
```json
{
  "pandoc_filters": [
    "%APPDATA%\\npm\\mermaid-filter.cmd"
  ]
}
```

**3. Test It Out**

Copy the following Markdown and convert with PasteMD:

~~~markdown
```mermaid
graph LR
    A[Start] --> B[Process]
    B --> C[End]
```
~~~

The Mermaid diagram will be rendered as an image and inserted into Word.

### More Filter Resources

- [Official Pandoc Filters List](https://github.com/jgm/pandoc/wiki/Pandoc-Filters)
- [Lua Filters Documentation](https://pandoc.org/lua-filters.html)

---

## 🧩 App Extensions (Custom Paste Workflows)

In Settings → **App Extensions**, you can configure paste modes per app and match by window title (regex supported):

* **HTML** / **Markdown** / **LaTeX** / **File**: choose the most suitable paste mode for each target app
  - HTML/Markdown suit rich-text note apps (e.g., Yuque)
  - LaTeX suits academic sites like Overleaf
  - File suits apps like QQ/WeChat that accept file attachments

> Tip: for the same app, configure only one workflow to avoid conflicts; use “window title matching” when needed.

Example config (excerpt):

> On Windows, `id` is usually the app's exe path; on macOS it's the bundle id (recommended to add via the settings UI for auto-fill).

```json
{
  "extensible_workflows": {
    "html": {
      "enabled": true,
      "apps": [
        {
          "name": "Yuque",
          "id": "/path/yuque.exe",
          "window_patterns": []
        }
      ],
      "keep_formula_latex": true
    },
    "latex": {
      "enabled": true,
      "apps": [
        {
          "name": "chrome",
          "id": "/path/chrome.exe",
          "window_patterns": [
            ".*overleaf.*"
          ]
        }
      ]
    },
    "file": {
      "enabled": true,
      "apps": [
        {
          "name": "QQ",
          "id": "/path/qq.exe",
          "window_patterns": []
        }
      ]
    }
  }
}
```

---

## Tray Menu

* Quick view: current global hotkey (read-only).
* Enable hotkey: toggle global hotkey.
* Popup notifications: toggle system notifications.
* No app action: default action when Word/WPS/Excel is not detected (auto open / save only / copy to clipboard / none).
* Move cursor to end: move caret to end after insertion.
* HTML formatting: toggle **strikethrough ~~ to `<del>`** and other HTML cleanup for correct conversion.
* Set hotkey: record and save a new global hotkey in the UI (takes effect immediately).
* Keep generated files: when enabled, DOCX files are saved to `save_dir`.
* Open save directory, view logs, edit config, reload config/hotkey.
* Version: show current version; check for updates; when available, show item and open download page.
* Quit: exit the app.

---

## 📦 Run From Source / Build

Recommended: Python 3.12 (64-bit).

```bash
pip install -r requirements.txt
python main.py
```

Using PyInstaller:

```bash
pyinstaller --clean -F -w -n PasteMD
  --icon assets\icons\logo.ico
  --add-data "assets\icons;assets\icons"
  --add-data "pastemd\i18n\locales\*.json;pastemd\i18n\locales"
  --add-data "pastemd\lua;pastemd\lua"
  --hidden-import plyer.platforms.win.notification
  main.py
```

The executable will be generated at `dist/PasteMD.exe`.

---

## ⭐ Star

Thanks for every star — please share PasteMD with more users. I am aiming for 4096 stars and will keep working hard!



[](https://star-history.dera.page/#RICHQAQ/PasteMD&type=date&legend=top-left)

## ☕ Support & Donation

If you have ideas or suggestions, feel free to open an issue! 🤯🤯🤯


You are also welcome to join the **PasteMD user group** to chat with others:


If this tool helps you, you can buy the author a coffee ☕. Your support motivates ongoing fixes, enhancements, and more scenarios. Thanks for every bit of support!


     
| Alipay | WeChat |
| --- | --- |
|  |  |


---

## License

This project is released under the [GNU Affero General Public License v3.0](../../LICENSE).
Third-party licenses are listed in [THIRD_PARTY_NOTICES.md](../../THIRD_PARTY_NOTICES.md).

---

## File: docs/md/README.ja.md

# PasteMD









## ❤️ スポンサー


| [](https://www.atlascloud.ai/?utm_source=github&utm_medium=link&utm_campaign=pasteMD) | [Atlas Cloud](https://www.atlascloud.ai/?utm_source=github&utm_medium=link&utm_campaign=pasteMD) は、開発者が単一の AI API で動画生成、画像生成、LLM API にアクセスできるフルモーダル AI 推論プラットフォームです。複数ベンダーとの連携を管理する代わりに、一度接続するだけで、あらゆるモダリティに対応した 300 以上の厳選モデルを統合的に利用できます。
  Atlas Cloud の新しい Coding Plan プロモーションで、より予算にやさしい API アクセスを確認できます：[https://www.atlascloud.ai/console/coding-plan](https://www.atlascloud.ai/console/coding-plan) |
| --- | --- |




> 論文やレポートを書いていると、ChatGPT / DeepSeek などの AI サイトからコピーした数式が Word で文字化けしませんか？Markdown の表を Excel に貼り付けると崩れませんか？**PasteMD はその問題を解決するためのツールです。**
> 
> 

常駐トレイの小さなツール：
**クリップボードの Markdown** を読み取り、**Pandoc** で DOCX に変換し、**Word/WPS** のカーソル位置に自動挿入します。

**✨ 機能**：Markdown 表をスマートに認識し、**Excel** にワンクリック貼り付け！

**✨ 機能**：HTML リッチテキストをスマートに認識し、Web 上の AI 返信を **Word/WPS** にワンクリック貼り付け！

**✨ 新機能**：アプリ拡張（HTML+Markdown/HTML/Markdown/LaTeX/ファイル貼り付け）。アプリ/ウィンドウタイトルでマッチ可能（例：語雀/QQ）。

**✨ 新機能**：変換強化：変換タイプごとの Pandoc Filters 設定、LaTeX 構文と単独の `$...$` 数式ブロックの自動修正。

---

## 機能紹介

### デモ

#### Markdown → Word/WPS



#### Web の AI 返信 → Word/WPS


#### Markdown 表 → Excel


#### 設定画面



* グローバルホットキー（既定 `Ctrl+Shift+B`）で Markdown → DOCX を一発変換。
* **✨ Markdown 表を自動認識**し、Excel に貼り付け。
* **✨ アプリ拡張**：アプリごとに HTML+Markdown/HTML/Markdown/LaTeX/ファイル貼り付けを設定し、ウィンドウタイトルでマッチ可能。
* **✨ 変換強化**：変換タイプ別に Pandoc Filters を追加し、一部 LaTeX 構文と単独 `$...$` 数式ブロックを自動修正。
* 前面アプリが Word/WPS かを自動判定。
* 必要に応じて Word/Excel を自動起動。
* トレイメニューから、ファイル保持やログ/設定の閲覧が可能。
* システム通知に対応。
* ブラックウィンドウなし、ノンブロッキングで安定稼働。

---

## 📊 AI サイト互換性テスト

主要 AI チャットサイトでのコピー＆貼り付け互換性テスト結果：

| AI サイト | Markdown のコピー（数式なし） | Markdown のコピー（数式あり） | Web 内容のコピー（数式なし） | Web 内容のコピー（数式あり） |
|---------|:----------------------------:|:----------------------------:|:---------------------------:|:---------------------------:|
| **Kimi** | ✅ 完全対応 | ✅ 完全対応 | ✅ 完全対応 | ⚠️ 数式が表示不可 |
| **DeepSeek** | ✅ 完全対応 | ✅ 完全対応 | ✅ 完全対応 | ✅ 完全対応 |
| **通义千问** | ✅ 完全対応 | ✅ 完全対応 | ✅ 完全対応 | ⚠️ 数式が表示不可 |
| **豆包\*** | ✅ 完全対応 | ✅ 完全対応 | ✅ 完全対応 | ✅ 完全対応 |
| **智谱清言/ChatGLM** | ✅ 完全対応 | ✅ 完全対応 | ✅ 完全対応 | ✅ 完全対応 |
| **ChatGPT** | ✅ 完全対応 | ⚠️ 数式がコード表示 | ✅ 完全対応 | ✅ 完全対応 |
| **Gemini** | ✅ 完全対応 | ✅ 完全対応 | ✅ 完全対応 | ✅ 完全対応 |
| **Grok** | ✅ 完全対応 | ✅ 完全対応 | ✅ 完全対応 | ✅ 完全対応 |
| **Claude** | ✅ 完全対応 | ✅ 完全対応 | ✅ 完全対応 | ✅ 完全対応 |

**凡例：**
- ✅ **完全対応**：書式/スタイル/数式が正しく表示
- ⚠️ **数式がコード表示**：数式が LaTeX コードとして表示されるため、Word/WPS の数式エディタで修正が必要
- ⚠️ **数式が表示不可**：数式が失われるため、Word/WPS の数式エディタで再入力が必要
- **豆包**：Web 内容（数式あり）をコピーする前に、ブラウザで「クリップボードの読み取り許可」を有効化してください（URL 左側のアイコンから設定可能）

**テスト方法：**
1. **Markdown のコピー**：AI 返信内の「コピー」ボタンを押す（Markdown 形式。サイトによっては HTML も含む）
2. **Web 内容のコピー**：AI 返信内容を直接選択してコピー（HTML リッチテキスト）

---

## 🚀 使い方

1. 実行ファイルをダウンロード（[Releases ページ](https://github.com/RICHQAQ/PasteMD/releases/)）：

   * ~~**PasteMD_vx.x.x.exe**：**ポータブル版**。事前に **Pandoc** をインストールし、コマンドラインで実行できる必要があります。  
   未インストールの場合は [Pandoc 公式サイト](https://pandoc.org/installing.html) から導入してください。~~（提供終了。必要なら自前でビルド）
   * **PasteMD_pandoc-Setup.exe**：**統合インストーラ**。Pandoc 同梱で追加設定不要。

2. Word/WPS/Excel を開き、挿入したい位置にカーソルを置く。

3. **Markdown** または **Web 内容** をクリップボードにコピーし、**Ctrl+Shift+B** を押す。

4. 変換結果が自動で挿入されます：
   - **Markdown 表** → Excel に自動貼り付け（Excel が開いている場合）
   - **通常 Markdown/Web 内容** → DOCX に変換して Word/WPS に挿入

5. 右下に成功/失敗の通知が表示されます。

---

## ⚙️ 設定

初回実行時にユーザーデータディレクトリへ `config.json` が生成されます（Windows：`%APPDATA%\\PasteMD\\config.json`、MacOS：`~/Library/Application Support/PasteMD/config.json`）。手動で編集可能です：

```json
{
  "hotkey": "<ctrl>+<shift>+b",
  "pandoc_path": "pandoc",
  "reference_docx": null,
  "save_dir": "%USERPROFILE%\\Documents\\pastemd",
  "keep_file": false,
  "notify": true,
  "startup_notify": true,
  "enable_excel": true,
  "excel_keep_format": true,
  "paste_delay_s": 0.3,
  "no_app_action": "open",
  "md_disable_first_para_indent": true,
  "html_disable_first_para_indent": true,
  "html_formatting": {
    "strikethrough_to_del": true
  },
  "move_cursor_to_end": true,
  "Keep_original_formula": false,
  "enable_latex_replacements": true,
  "fix_single_dollar_block": true,
  "language": "zh-CN",
  "pandoc_request_headers": [
    "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
  ],
  "pandoc_filters": [],
  "pandoc_filters_by_conversion": {
    "md_to_docx": [],
    "html_to_docx": [],
    "html_to_md": [],
    "md_to_html": [],
    "md_to_rtf": [],
    "md_to_latex": []
  },
  "extensible_workflows": {
    "html": {
      "enabled": true,
      "apps": [],
      "keep_formula_latex": true
    },
    "md": {
      "enabled": true,
      "apps": [],
      "html_formatting": {
        "css_font_to_semantic": true,
        "bold_first_row_to_header": true
      }
    },
    "latex": {
      "enabled": true,
      "apps": []
    },
    "file": {
      "enabled": true,
      "apps": []
    }
  }
}
```

項目説明：

* `hotkey`：グローバルホットキー。例 `<ctrl>+<alt>+v`。
* `pandoc_path`：Pandoc 実行ファイルのパス。
* `reference_docx`：Pandoc 参照テンプレート（任意）。
* `save_dir`：生成ファイルを保持する場合の保存先。
* `keep_file`：生成した DOCX を保持するか。
* `notify`：システム通知を表示するか。
* `startup_notify`：起動時に通知を表示するか。
* **`enable_excel`**：Markdown 表の自動認識と Excel 貼り付けを有効化（既定 true）。
* **`excel_keep_format`**：Excel 貼り付け時に Markdown 書式（太字/斜体/コードなど）を保持（既定 true）。
* `paste_delay_s`：貼り付け前の遅延秒数（Windows ではクリップボード更新に時間がかかる場合があります）。
* **`no_app_action`**：対象アプリ（Word/Excel など）が検出されない場合の既定動作（既定 `"open"`）。選択肢：`open`=自動で開く、`save`=保存のみ、`clipboard`=クリップボードへコピー、`none`=何もしない。
* **`md_disable_first_para_indent`**：Markdown 変換時、先頭段落の特殊書式を無効化し正文スタイルに統一（既定 true）。
* **`html_formatting`**：HTML リッチテキスト変換時の整形オプション。
  * **`strikethrough_to_del`**：取り消し線 ~~ を `<del>` に変換して正しく表示（既定 true）。
* **`html_disable_first_para_indent`**：HTML 変換時、先頭段落の特殊書式を無効化（既定 true）。
* **`move_cursor_to_end`**：挿入後にカーソルを末尾へ移動（既定 true）。
* **`Keep_original_formula`**：元の数式（LaTeX コード）を保持。
* `enable_latex_replacements`：互換性のない LaTeX 構文を自動修正（例：`{\\kern 10pt}` を `\\qquad` へ置換）。
* `fix_single_dollar_block`：単独行の `$ ... $` 数式ブロックを自動認識し `$$ ... $$` に修正。
* `language`：表示言語。`zh-CN` は簡体字中国語、`en-US` は英語、`ja-JP` は日本語。
* `pandoc_request_headers`：Pandoc がリモート資源をダウンロードする際のリクエストヘッダー（1 行 1 ヘッダー）。
* **`pandoc_filters`**：カスタム Pandoc Filter のリスト。`.lua` スクリプトや実行ファイルを指定し、順番に実行されます。高度な変換に使用。既定は空。例：`["%APPDATA%\\npm\\mermaid-filter.cmd"]` で Mermaid 図をサポート。
* `pandoc_filters_by_conversion`：変換タイプ別の Filters 設定（例：`md_to_docx`、`html_to_md` など）。
* `extensible_workflows`：アプリ拡張設定（アプリ/ウィンドウタイトルでマッチして貼り付け方式を切替）。詳細は下記。

変更後はトレイメニューの **「設定/ホットキーを再読み込み」** で即反映されます。

---

## 🔧 高度な機能：Pandoc Filters のカスタマイズ

### Pandoc Filter とは？

Pandoc Filter は、変換処理中に内容をカスタマイズするためのプラグインです。PasteMD は複数の Filter を順に適用できます。

### 例：Mermaid 図のサポート

Markdown で Mermaid 図を使いたい場合は、[mermaid-filter](https://github.com/raghur/mermaid-filter) が便利です。

**1. mermaid-filter をインストール**

```bash
npm install mermaid-filter
```

*前提： [Node.js](https://nodejs.org/) が必要です*


⚠️ **トラブルシューティング：Chrome のダウンロード失敗**

mermaid-filter のインストール時に Chromium をダウンロードします。失敗する場合は手動でダウンロードしてください：

**手順 1：必要な Chromium バージョンの確認**

次のファイルを開きます：`%APPDATA%\npm\node_modules\mermaid-filter\node_modules\puppeteer-core\lib\cjs\puppeteer\revisions.d.ts`

以下のような記述を探します：
```typescript
chromium: "1108766";
```

あるいはエラー出力の例：
```bash
npm error Error: Download failed: server returned code 502. URL: https://npmmirror.com/mirrors/chromium-browser-snapshots/Win_x64/1108766/chrome-win.zip
```
`Win_x64/1108766` のような番号がバージョンです。

この番号（例：`1108766`）をメモしてください。

**手順 2：Chromium をダウンロード**

上記バージョンに合わせてダウンロード：

```
https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1108766/chrome-win.zip
```

（URL 内の `1108766` を置き換えてください）

**手順 3：指定ディレクトリへ解凍**

ダウンロードした `chrome-win.zip` を以下へ解凍：

```
%USERPROFILE%\.cache\puppeteer\chrome\win64-1108766\chrome-win
```

（ディレクトリ内の `1108766` も置き換え）

解凍後、次の場所に `chrome.exe` があることを確認：
`%USERPROFILE%\.cache\puppeteer\chrome\win64-1108766\chrome-win\chrome.exe`



**2. PasteMD に設定**

方法 1：設定画面から
- PasteMD 設定 → 変換タブ → Pandoc Filters
- 「追加...」をクリック
- Filter を選択：`%APPDATA%\npm\mermaid-filter.cmd`
- 保存

方法 2：設定ファイルの編集
```json
{
  "pandoc_filters": [
    "%APPDATA%\\npm\\mermaid-filter.cmd"
  ]
}
```

**3. 動作確認**

以下の Markdown をコピーして PasteMD で変換：

~~~markdown
```mermaid
graph LR
    A[開始] --> B[処理]
    B --> C[終了]
```
~~~

Mermaid 図が画像として Word に挿入されます。

### その他の Filter 参考

- [Pandoc Filters 公式一覧](https://github.com/jgm/pandoc/wiki/Pandoc-Filters)
- [Lua Filters ドキュメント](https://pandoc.org/lua-filters.html)

---

## 🧩 アプリ拡張（カスタム貼り付けワークフロー）

設定 → **アプリ拡張** でアプリごとの貼り付け方式を設定し、ウィンドウタイトル（正規表現）でマッチ可能です：

* **HTML** / **Markdown** / **LaTeX** / **ファイル**：対象アプリに最適な貼り付け方式を選択
  - HTML/Markdown は語雀などのリッチテキストノートに適合
  - LaTeX は Overleaf などの学術サイトに適合
  - ファイルは QQ/WeChat など添付として貼り付けるアプリに適合

> ヒント：同一アプリには 1 つのワークフローのみ推奨（競合回避）。ウィンドウ名を分けたい場合は「ウィンドウ名マッチ」を使ってください。

設定例（抜粋）：

> Windows では `id` は通常 exe パス、macOS では bundle id（設定画面で追加すると自動入力されるので推奨）。

```json
{
  "extensible_workflows": {
    "html": {
      "enabled": true,
      "apps": [
        {
          "name": "语雀",
          "id": "/path/语雀.exe",
          "window_patterns": []
        }
      ],
      "keep_formula_latex": true
    },
    "latex": {
      "enabled": true,
      "apps": [
        {
          "name": "chrome",
          "id": "/path/chrome.exe",
          "window_patterns": [
            ".*overleaf.*"
          ]
        }
      ]
    },
    "file": {
      "enabled": true,
      "apps": [
        {
          "name": "QQ",
          "id": "/path/qq.exe",
          "window_patterns": []
        }
      ]
    }
  }
}
```

---

## トレイメニュー

* 快捷表示：現在のグローバルホットキー（読み取り専用）。
* ホットキーを有効化：グローバルホットキーのオン/オフ。
* ポップアップ通知：システム通知のオン/オフ。
* 無アプリ時の動作：Word/WPS/Excel が検出されない場合の既定動作（自動で開く/保存のみ/クリップボードへコピー/なし）。
* 挿入後にカーソルを末尾へ移動：挿入後のカーソル移動のオン/オフ。
* HTML 整形：**取り消し線 ~~ を `<del>` に変換** など、HTML 自動整形。
* ホットキー設定：UI で新しいホットキーを録音して保存（即時反映）。
* 生成ファイルを保持：オンにすると `save_dir` へ DOCX を保存。
* 保存先フォルダを開く、ログを見る、設定を編集、設定/ホットキーを再読み込み。
* バージョン：現在のバージョン表示、更新確認、更新時はダウンロードページを開く。
* 終了：アプリを終了。

---

## 📦 ソースから実行 / パッケージ化

Python 3.12（64bit）推奨。

```bash
pip install -r requirements.txt
python main.py
```

PyInstaller の場合：

```bash
pyinstaller --clean -F -w -n PasteMD
  --icon assets\icons\logo.ico
  --add-data "assets\icons;assets\icons"
  --add-data "pastemd\i18n\locales\*.json;pastemd\i18n\locales"
  --add-data "pastemd\lua;pastemd\lua"
  --hidden-import plyer.platforms.win.notification
  main.py
```

生成された実行ファイルは `dist/PasteMD.exe` に出力されます。

---

## ⭐ Star

Star してくれたみなさん、いつもありがとうございます！もっと多くの方に届くように頑張ります。4096 stars 目標です。



[](https://star-history.dera.page/#RICHQAQ/PasteMD&type=date&legend=top-left)

## 🍵 サポート/投げ銭

ご意見やアイデアがあれば issue でぜひ教えてください！🤯🤯🤯

**PasteMD ユーザー交流グループ**にも参加歓迎：


このツールが役に立てば嬉しいです。作者にコーヒーを一杯ごちそうしてもらえると、さらに開発の励みになります。ありがとうございます！


     
| 支付宝 | 微信 |
| --- | --- |
|  |  |


---

## License

This project is licensed under the [GNU Affero General Public License v3.0](../../LICENSE).
Third-party licenses are listed in [THIRD_PARTY_NOTICES.md](../../THIRD_PARTY_NOTICES.md).