# kuuhaku-u/pptxhell architecture

> Architecture diagram of the GitHub repository kuuhaku-u/pptxhell, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kuuhaku-u/pptxhell
- Repository: https://github.com/kuuhaku-u/pptxhell

## Overview

PowerPoint to HTML Converter is a Go command-line tool that opens a PPTX archive, extracts slide content and formatting, and writes HTML for a selected slide. The main workflow is coordinated in main.go: background, text, math, shape, image, and video extraction feed HTML generation. The README also advertises tables, charts, links, and grouped elements; these are shown as documented capabilities, but their implementation wiring is not established by the sampled source. The graph reflects the CLI path; the JavaScript wrapper is an alternate launcher. Some feature claims come from the README rather than inspected implementation.

Main entry points: [`main.go`](https://github.com/kuuhaku-u/pptxhell/blob/orion/main/main.go) (Converter CLI), [`textfinder/textfinder.go`](https://github.com/kuuhaku-u/pptxhell/blob/orion/main/textfinder/textfinder.go) (Text extraction), [`helper/helper.go`](https://github.com/kuuhaku-u/pptxhell/blob/orion/main/helper/helper.go) (Slide HTML builder), [`pptXhellJs/index.js`](https://github.com/kuuhaku-u/pptxhell/blob/orion/main/pptXhellJs/index.js) (JS launcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry points"]
  node_cli["Converter CLI<br/>[main.go]"]
  node_jslauncher["JS launcher<br/>[index.js]"]
end

subgraph group_extract["Slide extraction"]
  node_background["Background finder<br/>[bgfinder.go]"]
  node_text["Text extraction<br/>[textfinder.go]"]
  node_colorfallback["Text color fallback<br/>[fallback.go]"]
  node_math["Math extraction<br/>[math.go]"]
  node_shapes["Shape extraction<br/>[shapefinder.go]"]
  node_images["Image extraction<br/>[imagefinder.go]"]
  node_videos["Video extraction<br/>[videofinder.go]"]
end

subgraph group_render["HTML rendering"]
  node_htmlbuilder["Slide HTML builder<br/>[helper.go]"]
end

subgraph group_documented["Documented features"]
  node_tables["Table support"]
  node_charts["Chart support"]
  node_links["Hyperlink support"]
  node_groups["Grouped elements"]
end

node_user(("Presentation user"))
node_pptx["PPTX archive"]
node_htmlfiles["HTML slide files"]
node_mathjax(("MathJax"))

node_user -->|"runs conversion"| node_cli
node_user -->|"runs wrapper"| node_jslauncher
node_jslauncher -->|"executes binary"| node_cli
node_cli -->|"opens archive"| node_pptx
node_cli -->|"finds background"| node_background
node_cli -->|"extracts text"| node_text
node_cli -->|"applies fallback"| node_colorfallback
node_cli -->|"extracts equations"| node_math
node_cli -->|"extracts shapes"| node_shapes
node_cli -->|"extracts images"| node_images
node_cli -->|"extracts videos"| node_videos
node_cli -->|"builds slide HTML"| node_htmlbuilder
node_htmlbuilder -->|"returns HTML"| node_htmlfiles
node_cli -->|"writes files"| node_htmlfiles
node_htmlbuilder -.->|"references renderer"| node_mathjax
node_text -.->|"supports tables"| node_tables
node_text -.->|"supports charts"| node_charts
node_text -.->|"supports links"| node_links
node_text -.->|"supports groups"| node_groups

click node_cli "https://github.com/kuuhaku-u/pptxhell/blob/orion/main/main.go"
click node_jslauncher "https://github.com/kuuhaku-u/pptxhell/blob/orion/main/pptXhellJs/index.js"
click node_background "https://github.com/kuuhaku-u/pptxhell/blob/orion/main/bgfinder/bgfinder.go"
click node_text "https://github.com/kuuhaku-u/pptxhell/blob/orion/main/textfinder/textfinder.go"
click node_colorfallback "https://github.com/kuuhaku-u/pptxhell/blob/orion/main/textfinder/fallback.go"
click node_math "https://github.com/kuuhaku-u/pptxhell/blob/orion/main/math/math.go"
click node_shapes "https://github.com/kuuhaku-u/pptxhell/blob/orion/main/shapefinder/shapefinder.go"
click node_images "https://github.com/kuuhaku-u/pptxhell/blob/orion/main/imagefinder/imagefinder.go"
click node_videos "https://github.com/kuuhaku-u/pptxhell/blob/orion/main/videofinder/videofinder.go"
click node_htmlbuilder "https://github.com/kuuhaku-u/pptxhell/blob/orion/main/helper/helper.go"
click node_tables "https://github.com/kuuhaku-u/pptxhell/tree/orion/main/textfinder"
click node_charts "https://github.com/kuuhaku-u/pptxhell/tree/orion/main/textfinder"
click node_links "https://github.com/kuuhaku-u/pptxhell/tree/orion/main/textfinder"
click node_groups "https://github.com/kuuhaku-u/pptxhell/tree/orion/main/textfinder"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_jslauncher,node_user toneBlue
class node_background,node_text,node_colorfallback,node_math,node_shapes,node_images,node_videos toneAmber
class node_htmlbuilder toneMint
class node_tables,node_charts,node_links,node_groups toneRose
class node_pptx,node_htmlfiles,node_mathjax toneIndigo
```

## Components

### Entry points

- [Converter CLI](https://github.com/kuuhaku-u/pptxhell/blob/orion/main/main.go): `main.go`
- [JS launcher](https://github.com/kuuhaku-u/pptxhell/blob/orion/main/pptXhellJs/index.js): `pptXhellJs/index.js`

### Slide extraction

- [Background finder](https://github.com/kuuhaku-u/pptxhell/blob/orion/main/bgfinder/bgfinder.go): `bgfinder/bgfinder.go`
- [Text extraction](https://github.com/kuuhaku-u/pptxhell/blob/orion/main/textfinder/textfinder.go): `textfinder/textfinder.go`
- [Text color fallback](https://github.com/kuuhaku-u/pptxhell/blob/orion/main/textfinder/fallback.go): `textfinder/fallback.go`
- [Math extraction](https://github.com/kuuhaku-u/pptxhell/blob/orion/main/math/math.go): `math/math.go`
- [Shape extraction](https://github.com/kuuhaku-u/pptxhell/blob/orion/main/shapefinder/shapefinder.go): `shapefinder/shapefinder.go`
- [Image extraction](https://github.com/kuuhaku-u/pptxhell/blob/orion/main/imagefinder/imagefinder.go): `imagefinder/imagefinder.go`
- [Video extraction](https://github.com/kuuhaku-u/pptxhell/blob/orion/main/videofinder/videofinder.go): `videofinder/videofinder.go`

### HTML rendering

- [Slide HTML builder](https://github.com/kuuhaku-u/pptxhell/blob/orion/main/helper/helper.go): `helper/helper.go`

### Documented features

- [Table support](https://github.com/kuuhaku-u/pptxhell/tree/orion/main/textfinder): `textfinder`
- [Chart support](https://github.com/kuuhaku-u/pptxhell/tree/orion/main/textfinder): `textfinder`
- [Hyperlink support](https://github.com/kuuhaku-u/pptxhell/tree/orion/main/textfinder): `textfinder`
- [Grouped elements](https://github.com/kuuhaku-u/pptxhell/tree/orion/main/textfinder): `textfinder`

### Other components

- **Presentation user**
- **PPTX archive**
- **HTML slide files**
- **MathJax**

## Connections

- Presentation user → Converter CLI: runs conversion (evidence: `README.md`)
- Presentation user → JS launcher: runs wrapper (evidence: `pptXhellJs/index.js`)
- JS launcher → Converter CLI: executes binary (evidence: `pptXhellJs/index.js`)
- Converter CLI → PPTX archive: opens archive (evidence: `main.go`)
- Converter CLI → Background finder: finds background (evidence: `main.go`)
- Converter CLI → Text extraction: extracts text (evidence: `main.go`)
- Converter CLI → Text color fallback: applies fallback (evidence: `main.go`)
- Converter CLI → Math extraction: extracts equations (evidence: `main.go`)
- Converter CLI → Shape extraction: extracts shapes (evidence: `main.go`)
- Converter CLI → Image extraction: extracts images (evidence: `main.go`)
- Converter CLI → Video extraction: extracts videos (evidence: `main.go`)
- Converter CLI → Slide HTML builder: builds slide HTML (evidence: `main.go`)
- Slide HTML builder → HTML slide files: returns HTML (evidence: `helper/helper.go`)
- Converter CLI → HTML slide files: writes files (evidence: `main.go`)
- Slide HTML builder → MathJax: references renderer (evidence: `README.md`)
- Text extraction → Table support: supports tables (evidence: `README.md`)
- Text extraction → Chart support: supports charts (evidence: `README.md`)
- Text extraction → Hyperlink support: supports links (evidence: `README.md`)
- Text extraction → Grouped elements: supports groups (evidence: `README.md`)
