Skip to content

Latest commit

 

History

History
230 lines (148 loc) · 3.38 KB

File metadata and controls

230 lines (148 loc) · 3.38 KB

Examples

Browse DeckHTML CLI workflows for local HTML files, stdin, ordered HTML files, hosted URLs, reports, script-friendly output, and cloud reconstruction.

Run Without Installing

Convert a local HTML file with the npm package:

npx -y @deckflow/deckhtml@latest index.html -o deck.pptx

Install the CLI globally when you use it often:

npm install -g @deckflow/deckhtml
deckhtml --version

Convert a Single HTML File

Convert a local HTML file to PPTX:

deckhtml index.html

The default output uses the input file name:

index.pptx

Write to a specific output path:

deckhtml index.html -o deck.pptx

Convert HTML from Stdin

Pipe generated HTML into DeckHTML:

cat index.html | deckhtml - -o deck.pptx

Use - as the stdin input placeholder. Provide --output or -o when converting stdin.


Convert Multiple Ordered Files

Pass files in the order they should appear:

deckhtml title.html agenda.html content.html summary.html -o deck.pptx

Convert a URL

Convert a hosted HTML deck:

deckhtml https://example.com/deck.html -o deck.pptx

Wait longer for client-side rendering:

deckhtml https://example.com/deck.html -o deck.pptx --render-wait 9

Generate PNG Output

Generate PNG frames from one HTML file:

deckhtml index.html --format png -o frames

Generate PNG frames from multiple explicit HTML files:

deckhtml title.html chart.html appendix.html --format png -o frames

Generate the default PPTX format explicitly:

deckhtml index.html --format pptx -o deck.pptx

Use Local, Auto, or Cloud Mode

Force local conversion:

deckhtml index.html -o deck.pptx --mode local

Let DeckHTML choose the mode:

deckhtml index.html -o deck.pptx --mode auto

Force cloud conversion:

deckhtml index.html -o deck.pptx --mode cloud

auto uses cloud mode when an API key is configured and local mode otherwise. Local mode works without authentication.


Use Cloud Reconstruction Features

Rebuild richer presentation objects in cloud mode:

deckhtml index.html \
  -o deck.pptx \
  --mode cloud \
  --embed-fonts \

These flags are cloud-only.


Generate a Conversion Report

Create a report next to the output:

deckhtml index.html -o deck.pptx --report

Get Machine-Readable Output

Return JSON for scripts and CI:

deckhtml index.html -o deck.pptx --json
{
  "ok": true,
  "input": ["index.html"],
  "output": "deck.pptx",
  "format": "pptx",
  "mode": "local"
}

Combine JSON with stdin:

cat index.html | deckhtml - -o deck.pptx --json

Adjust Log Output

Print only the final result:

deckhtml index.html -o deck.pptx --quiet

Print detailed conversion logs:

deckhtml index.html -o deck.pptx --verbose

Configure Cloud Access

Start browser login:

deckhtml auth login

Set an API key directly:

deckhtml config set api-key <key>

For CI, Docker, and agent environments, set the environment variable:

export DECKHTML_API_KEY=your-api-key
deckhtml index.html -o deck.pptx --mode cloud

Verify your credentials:

deckhtml auth status

Configure PPTX Size

deckhtml config set size 1920x1080

The default PPTX size is 1920x1080.