Implementation:24kchengYe MemoMind Build PPT
| Knowledge Sources | |
|---|---|
| Domains | Documentation, Presentation |
| Last Updated | 2026-10-28 00:00 GMT |
Overview
English PowerPoint presentation generator using pptxgenjs with React-rendered slides, SVG icon generation, and sharp image processing.
Description
The build-ppt.js script generates the English-language MemoMind presentation deck using pptxgenjs. Renders React components to SVG/images via ReactDOMServer and sharp for image processing. Uses a dark tech theme with color-coded fact types (world=green, experience=purple, observation=gold, mental model=blue). Includes diagrams, charts, and demo screenshots. Generates geometric icons as SVG and converts them to PNG via sharp.
Usage
Run via Node.js: `node build-ppt.js`. Requires pptxgenjs, react, react-dom, and sharp npm packages.
Code Reference
Source Location
- Repository: MemoMind
- File: build-ppt.js
- Lines: L1-1271
Signature
const pptxgen = require("pptxgenjs");
const React = require("react");
const ReactDOMServer = require("react-dom/server");
const sharp = require("sharp");
async function svgToBase64Png(svgString, size = 256): Promise<string> { ... }
function makeBrainIcon(color, size = 256): string { ... }
function makeCheckIcon(color, size = 256): string { ... }
async function buildPresentation(): Promise<void> { ... }
Import
# Run directly with Node.js
node build-ppt.js
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| docs/demos/ | directory | Yes | Demo screenshots |
| docs/diagrams/ | directory | Yes | Diagram images |
| pptxgenjs, react, sharp | npm packages | Yes | Required libraries |
Outputs
| Name | Type | Description |
|---|---|---|
| MemoMind.pptx | file | English presentation deck |
Usage Examples
Generating the English Presentation
# Install dependencies
npm install pptxgenjs react react-dom sharp
# Generate English presentation
node build-ppt.js
# Output: MemoMind.pptx