{"_id":"@axw_/koishi-plugin-markdown-to-image-service","_rev":"10-a555e4d9f4da6e31e8de2afade8787c1","name":"@axw_/koishi-plugin-markdown-to-image-service","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0-alpha.1":{"name":"@axw_/koishi-plugin-markdown-to-image-service","version":"0.1.0-alpha.1","keywords":["koishi","plugin","markdown","image","puppeteer","service","napcat","docker","chatbot","md","服务","文本转图片","渲染"],"author":{"name":"furryaxw","email":"93119225+furryaxw@users.noreply.github.com"},"license":"MIT","_id":"@axw_/koishi-plugin-markdown-to-image-service@0.1.0-alpha.1","maintainers":[{"name":"axw_","email":"qianyucun07@163.com"}],"homepage":"https://github.com/furryaxw/koishi-plugin-markdown-to-image-service","bugs":{"url":"https://github.com/furryaxw/koishi-plugin-markdown-to-image-service/issues"},"dist":{"shasum":"f252a7a1cebb47cdd4404d678a8a2dac9e70e313","tarball":"https://registry.npmjs.org/@axw_/koishi-plugin-markdown-to-image-service/-/koishi-plugin-markdown-to-image-service-0.1.0-alpha.1.tgz","fileCount":4,"integrity":"sha512-Y/5ftkpSLwAx9Y0gMPLkHMqqFWIa4xyuRFG/Zjx+t4NIsGkAT5+XlS5ULGoDSM6cU0T++Mg94XwK/wvnSYDiRw==","signatures":[{"sig":"MEYCIQDKslG+k8L/AwnWX7S6kxZMpZmeLlbPJfLrCV+ZyBmhbwIhAIMyLfP58Bx5cLNcgYrywuzF/c3bQdbrU8VRJIawrQrJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30389},"main":"lib/index.js","koishi":{"service":{"required":["puppeteer"],"implements":["markdownToImage"]}},"gitHead":"232f9b22ad626fec7c5d5db5e6b0a3318f14b86b","scripts":{"build":"tsc"},"typings":"lib/index.d.ts","_npmUser":{"name":"axw_","email":"qianyucun07@163.com"},"repository":{"url":"git+https://github.com/furryaxw/koishi-plugin-markdown-to-image-service.git","type":"git"},"_npmVersion":"10.9.2","description":"一个功能强大的 Markdown 转图片服务，支持丰富的语法和主题，并能处理来自 NapCat 等适配器的文件上传。","directories":{},"_nodeVersion":"22.15.0","dependencies":{"crossnote":"^0.9.10","puppeteer-finder":"^1.1.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0"},"peerDependencies":{"koishi":"^4.17.0","koishi-plugin-puppeteer":""},"_npmOperationalInternal":{"tmp":"tmp/koishi-plugin-markdown-to-image-service_0.1.0-alpha.1_1753539486759_0.6206225451452916","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@axw_/koishi-plugin-markdown-to-image-service","description":"一个功能强大的 Markdown 转图片服务，支持丰富的语法和主题，并能处理来自 NapCat 等适配器的文件上传。","version":"0.1.0","main":"lib/index.js","typings":"lib/index.d.ts","author":{"name":"furryaxw","email":"93119225+furryaxw@users.noreply.github.com"},"license":"MIT","homepage":"https://github.com/furryaxw/koishi-plugin-markdown-to-image-service","repository":{"type":"git","url":"git+https://github.com/furryaxw/koishi-plugin-markdown-to-image-service.git"},"scripts":{"build":"tsc"},"keywords":["koishi","plugin","markdown","image","puppeteer","service","napcat","docker","chatbot","md","服务","文本转图片","渲染"],"koishi":{"service":{"required":["puppeteer"],"implements":["markdownToImage"]}},"peerDependencies":{"koishi":"^4.17.0","koishi-plugin-puppeteer":""},"dependencies":{"crossnote":"^0.9.10","puppeteer-finder":"^1.1.1"},"devDependencies":{"typescript":"^5.0.0"},"_id":"@axw_/koishi-plugin-markdown-to-image-service@0.1.0","gitHead":"8416bb80f93f9067c6f387f8471728ebc3388775","bugs":{"url":"https://github.com/furryaxw/koishi-plugin-markdown-to-image-service/issues"},"_nodeVersion":"22.15.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-iFhc09X7ngIICL0NgdCrr0RcyKHwtLbWlQJ7W6ycR9/HDD9FzXffZpOfu8UCkPq0vCvfOYtBHDMh5F8Y2pgIbA==","shasum":"610217bf67a489afd4b89821107e30b827c65f83","tarball":"https://registry.npmjs.org/@axw_/koishi-plugin-markdown-to-image-service/-/koishi-plugin-markdown-to-image-service-0.1.0.tgz","fileCount":4,"unpackedSize":30382,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDu/sEGCE/GqsJWFEtsiehd/ux/NBYK4AkVRlpUb3i7KQIhAP9SxRJ6cBz2PBZ6db03CKcJCSErGG7SFZWjBK8NH8eQ"}]},"_npmUser":{"name":"axw_","email":"qianyucun07@163.com"},"directories":{},"maintainers":[{"name":"axw_","email":"qianyucun07@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/koishi-plugin-markdown-to-image-service_0.1.0_1763049232997_0.19993114872414242"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-26T14:18:06.647Z","modified":"2025-11-13T15:53:53.384Z","1.0.0":"2025-07-26T12:30:54.089Z","1.0.1":"2025-07-26T12:43:29.709Z","1.0.2":"2025-07-26T12:59:21.043Z","1.0.4":"2025-07-26T14:03:10.021Z","1.0.0-alpha.1":"2025-07-26T14:09:57.829Z","0.1.0-alpha.1":"2025-07-26T14:18:06.947Z","0.1.0":"2025-11-13T15:53:53.185Z"},"bugs":{"url":"https://github.com/furryaxw/koishi-plugin-markdown-to-image-service/issues"},"author":{"name":"furryaxw","email":"93119225+furryaxw@users.noreply.github.com"},"license":"MIT","homepage":"https://github.com/furryaxw/koishi-plugin-markdown-to-image-service","keywords":["koishi","plugin","markdown","image","puppeteer","service","napcat","docker","chatbot","md","服务","文本转图片","渲染"],"repository":{"type":"git","url":"git+https://github.com/furryaxw/koishi-plugin-markdown-to-image-service.git"},"description":"一个功能强大的 Markdown 转图片服务，支持丰富的语法和主题，并能处理来自 NapCat 等适配器的文件上传。","maintainers":[{"name":"axw_","email":"qianyucun07@163.com"}],"readme":"# @axw_/koishi-plugin-markdown-to-image-service\n\n[![npm](https://img.shields.io/npm/v/@axw_/koishi-plugin-markdown-to-image-service?style=flat-square)](https://www.npmjs.com/package/@axw_/koishi-plugin-markdown-to-image-service)\n\n## 简介\n\nKoishi 的 Markdown 转图片服务插件。支持 LaTeX、Mermaid、代码高亮等丰富的 Markdown 语法。\n\n> **版本说明**\n> \n> 本插件是 [araea/koishi-plugin-markdown-to-image-service](https://github.com/araea/koishi-plugin-markdown-to-image-service) 的一个分叉版本。\n> \n> 在原插件的强大功能基础上，本版本进行了修改和增强，主要增加了以下功能。\n\n## 新增功能\n\n* **文件直接上传渲染**: 无需使用指令，在聊天中向机器人**直接发送 `.md` 文件**即可自动触发渲染并返回图片。\n* **强大的兼容性**: 内置了对 `NapCat` 适配器的特殊文件处理逻辑，使其能够正确接收和处理上传的文件。\n* **专为 Docker/WSL 设计的路径映射**: 通过简单的配置，完美解决 Koishi 与 OneBot 客户端（如 NapCat）在不同环境（例如 Windows 主机 + Docker 容器）下部署时的文件路径不匹配问题。\n\n## 使用方式\n\n1.  **直接上传文件 (推荐)**: 在任意聊天窗口向机器人发送一个 `.md` 文件。\n2.  **使用指令**: 在聊天中发送 `markdown <你的MD文本>` 来转换纯文本内容。\n\n## 插件配置\n\n除了原有的多种渲染和主题配置外，本插件特别增加了以下用于处理文件上传的配置项：\n\n### 跨环境路径映射设置 (Docker/WSL 用户必读)\n\n如果您的 Koishi 和 OneBot 客户端（如 NapCat）不在同一个操作系统环境，您**必须**配置此项。\n\n* `containerPathPrefix`\n    * **作用**: OneBot 客户端（NapCat）所在的容器或环境提供的文件路径前缀。\n    * **示例**: 根据我们的调试日志，您这里应填 `/app/.config/QQ/NapCat/temp`\n\n* `hostPathPrefix`\n    * **作用**: 与上述容器内路径相对应的、Koishi 所在主机或容器可以访问的路径前缀。\n    * **示例**: `D:\\koishi-data\\napcat-files` (请确保此路径已通过 Docker/WSL 的数据卷正确挂载)\n\n## 致谢\n\n- [Koishi](https://koishi.chat/) - 机器人框架\n- [crossnote](https://github.com/shd101wyy/crossnote) - Markdown 渲染引擎\n\n## License\n\nMIT License © 2024\n","readmeFilename":"readme.md"}