Forked from acmar/export-to-word-plugin
Forked from acmar/export-to-word-plugin
README.md
This plugin allows LM Studio models to export chat conversations into formatting-rich Word (.docx) documents, support structured tables, and append new content to existing files.
Initially, this plugin was designed to use the heavy docx library. However, due to node environment warnings (like --localstorage-file) and rigid file-creation limits, the library was completely removed. (after rev.10)
Instead of generating a document from scratch, this plugin uses a lightweight, ultra-stable boilerplate approach: it takes a ready-made document template (empty_template.json, which is a renamed valid .docx file) and performs lightning-fast XML injections directly into the archive using adm-zip.
README.md
This plugin allows LM Studio models to export chat conversations into formatting-rich Word (.docx) documents, support structured tables, and append new content to existing files.
Initially, this plugin was designed to use the heavy docx library. However, due to node environment warnings (like --localstorage-file) and rigid file-creation limits, the library was completely removed. (after rev.10)
Instead of generating a document from scratch, this plugin uses a lightweight, ultra-stable boilerplate approach: it takes a ready-made document template (empty_template.json, which is a renamed valid .docx file) and performs lightning-fast XML injections directly into the archive using adm-zip.
# headers, **bold**, __bold__, etc.).Run the following commands in your plugin directory:
npx tsc lms dev lms dev -install -y
Alternatively, you can fetch the plugin directly via the LM Studio CLI once published:
lms get tupik/export-to-docx -y
export_to_docx: Parses the current chat history, builds structural XML elements, and generates a structured document.create_empty_docx: Copies the core empty_template.json boilerplate to create a fresh, valid, and blank .docx file in your workspace.append_paragraph: Opens an existing document, locates the end of the document body, and appends new Markdown text or tables.You have access to Word generation tools. Strict execution rules:
create_empty_docx first.create_empty_docx, extract the path or filename.append_paragraph. Pass the exact SAME filename/path you obtained in step 2. Do not omit the extension.append_paragraph multiple times sequentially to build a large document.Inspired by and alternative to:
# headers, **bold**, __bold__, etc.).Run the following commands in your plugin directory:
npx tsc lms dev lms dev -install -y
Alternatively, you can fetch the plugin directly via the LM Studio CLI once published:
lms get tupik/export-to-docx -y
export_to_docx: Parses the current chat history, builds structural XML elements, and generates a structured document.create_empty_docx: Copies the core empty_template.json boilerplate to create a fresh, valid, and blank .docx file in your workspace.append_paragraph: Opens an existing document, locates the end of the document body, and appends new Markdown text or tables.You have access to Word generation tools. Strict execution rules:
create_empty_docx first.create_empty_docx, extract the path or filename.append_paragraph. Pass the exact SAME filename/path you obtained in step 2. Do not omit the extension.append_paragraph multiple times sequentially to build a large document.Inspired by and alternative to: