Skip to main content

@dougschaefer/openai-document

v2026.04.27.2

OpenAI-powered document processing for .pptx and .docx — analyze structure, enhance text while preserving formatting, generate from templates, and design pixel-perfect PDFs from natural-language instructions via headless Chromium. Vault-based API key.

Repository

https://github.com/dougschaefer6/swamp-openai-document

Labels

openaidocumentpptxdocxpowerpointwordpdfaigenerationtemplate

Contents

Quality score

How well-documented and verifiable this extension is.

100%

Grade A

  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Has description1/1earned
  • At least one platform tag (or universal)1/1earned
  • Two or more platform tags (or universal)1/1earned
  • License declared1/1earned
  • Verified public repository2/2earned

Install

$ swamp extension pull @dougschaefer/openai-document

Release Notes

Add curated README and LICENSE to tarball (additionalFiles), bringing extension's Swamp Club quality grade from F/B to A-/B.

@dougschaefer/openai-documentv2026.04.17.2openai-document/document.ts
analyzeParse a .pptx or .docx file and return its structure, sections, and text content.
ArgumentTypeDescription
filePathstringAbsolute path to the .pptx or .docx file
outputNamestring
designDesign a professional document as PDF. GPT generates complete HTML with inline CSS based on your design instructions and content, then headless Chromium renders it to a pixel-perfect PDF. Supports designing from scratch, from a content description, or from an existing .docx file's extracted content.
ArgumentTypeDescription
instructionsstringDesign and content direction — describe the visual style, layout, colors, and what content to include. E.g., 'Modern proposal for Snap Inc, Kentucky blue and white color scheme, clean layout with geometric accents, two-column sections where appropriate. Cover page with large color block and company name.'
contentSource?stringOptional: absolute path to a .docx file to extract content from. The design method will pull the text and restructure it into the new design. If omitted, GPT generates content based on instructions alone.
context?stringAdditional context — company info, client details, scope data, brand guidelines, etc.
outputNamestring
enhanceEnhance or modify text content of a .pptx or .docx using GPT, preserving formatting and design.
ArgumentTypeDescription
filePathstringAbsolute path to the .pptx or .docx file
instructionsstringWhat to change in the text content
modelenum
outputNamestring
generateGenerate a new document from a .docx/.pptx template by populating placeholders with GPT-generated content.
ArgumentTypeDescription
templatePathstringAbsolute path to the template .pptx or .docx file
instructionsstringWhat content to generate
context?stringAdditional context
modelenum
outputNamestring

Resources

analysis(infinite)— Parsed document structure and content
document(infinite)— Designed, generated, or enhanced document file