pptz

PowerPoint Zero: a portable MoonBit PPTX generator driven by YAML deck and page sources.

pptx
presentation
yaml
wasm
moon add Milky2018/pptz@0.7.1
Download zip
Author
Version
0.7.1
License
Apache-2.0
Last updated
last month
Downloads
90
README

#Milky2018/pptz

pptz is PowerPoint Zero, a portable MoonBit presentation compiler. It reads a YAML deck file, validates the deck and referenced page files, and writes a PPTX through a wasm CLI.

#Usage

Use the published package:

moon runwasm Milky2018/pptz <deck.pptz.yaml> [--out <output.pptx>]

For reproducible runs, pin the published version:

moon runwasm Milky2018/pptz@0.7.1 <deck.pptz.yaml> [--out <output.pptx>]

Run the command from the deck project directory and use relative paths. The published wasm runs with WASI-style file access, so absolute paths outside the current working tree may not be visible.

While developing this repository, run the top-level package:

moon runwasm . examples/minimal/deck.pptz.yaml --out examples/minimal/dist/demo.pptx

If --out is omitted, the output path defaults to output.pptx. Add --svg-out <dir> to write one SVG preview per slide for QA.

#Templates

First-party source templates live under templates/. Copy a template pack into a deck workspace, edit the YAML sources, and compile the copied deck. Use templates/catalog.yaml to choose a pack by deck type, visual style, avoid cases, and page patterns. There are 11 first-party packs, each with at least 8 page patterns: technical-dark, technical-light, data-report, course-lecture, product-demo, executive-briefing, research-report, strategy-consulting, startup-pitch, brand-editorial, and training-workshop.

technical-dark is the flagship technical template. Use it as the quality reference for architecture reviews, compiler/runtime talks, API walkthroughs, and engineering roadmaps.

#Pipeline

pptz authoring stays in YAML. The compiler loads and validates deck/page sources, lowers the resolved deck into a controlled SVG IR, then writes native editable PPTX output from that IR. The optional SVG preview writer serializes the same IR to per-slide .svg files for layout QA.

#Agent Skill

This repository can also be installed as an agent skill with the Skills CLI. Keep the SKILL.md frontmatter name as pptz.

npx skills add https://github.com/moonbit-community/pptz.git

If you are installing from a repository that contains multiple skills, select this skill explicitly:

npx skills add https://github.com/moonbit-community/pptz.git --skill pptz

You can also target a specific agent or install globally:

npx skills add https://github.com/moonbit-community/pptz.git --agent codex npx skills add https://github.com/moonbit-community/pptz.git --global

After installation, ask your agent to use pptz when you need a PPTX deck generated from YAML sources. The skill will guide the agent to:

  • design a deck directory with deck.pptz.yaml, pages/, optional images/, and dist/;
  • keep sources within the writer's supported feature set;
  • compile the deck with moon runwasm Milky2018/pptz;
  • deliver both the editable sources and generated .pptx.

#Current Writer Scope

The current writer supports:

  • explicit deck size and ordered page files;
  • optional solid, gradient, or image page backgrounds;
  • text elements with theme text styles, local overrides, text wrapping, line breaks, letter spacing, rich paragraphs, styled runs, bullets, external hyperlinks, body insets, shrink autofit enabled by default, and strict overflow validation unless body.overflow explicitly downgrades it;
  • PowerPoint preset auto-shapes with optional embedded text, excluding line and connector presets;
  • straight, bent, and curved connectors with coordinate or auto-anchored element endpoints, stroke, dash, and arrowheads;
  • solid fills, gradient fills, no-fill shapes, and solid or dashed borders;
  • outer shadows for shape and connector elements;
  • built-in icon elements for cube, circle, square, star, heart, plus, home, info, help, return, blank, smiley, sun, moon, cloud, lightning, gear6, gear9, funnel, chart_plus, chart_star, chart_x, and no_smoking, with optional fas:-style prefixes;
  • table elements with explicit or evenly distributed column widths and row heights, including cell merge spans, cell styling, and theme table styles;
  • inline chart elements for bar, line, pie, doughnut, area, scatter, bubble, and radar, with title, legend, style, data labels, data table, rounded-corner options, and a category chart data shorthand;
  • built-in diagram elements for cycle, central_idea, hub_spoke, matrix, and process, expanded to editable labels, shapes, generated chrome, and connectors with layout diagnostics;
  • first-class type: "layout" primitives for recurring page patterns: title_block, section_divider, two_column, card_grid, media_aside, chart_with_caption, table_with_note, diagram_panel, stat_strip, and quote_panel;
  • raster image elements with fit: "stretch", fit: "cover", or fit: "contain";
  • image crop rectangles;
  • SVG image assets, with the backend-required PNG fallback handled internally. Generated diagram chrome uses direct SVG parts.

Schema-valid features outside this scope fail with a writer capability error instead of being silently ignored. This includes unsupported icon names, unsupported connector kinds, line/connector shape presets, and unsupported shape names.

#Example

The maintained example deck is in examples/minimal. It is intentionally small but covers the features the writer can render today.

cd examples/minimal moon runwasm Milky2018/pptz deck.pptz.yaml --out dist/demo.pptx

The YAML smoke fixture is in examples/testdata:

moon runwasm Milky2018/pptz examples/testdata/yaml-deck.pptz.yaml --out examples/testdata/out/yaml-demo.pptx

For local development against the checkout instead of the published wasm:

moon runwasm . examples/minimal/deck.pptz.yaml --out examples/minimal/dist/demo.pptx

To also write SVG previews:

moon runwasm . examples/minimal/deck.pptz.yaml --out examples/minimal/dist/demo.pptx --svg-out examples/minimal/dist/svg

#Validation

Run the wasm target checks before relying on a change:

moon check --target wasm moon test --target wasm

See REFERENCE.md for the source schema, diagnostics, and CLI contract.

Validate all first-party templates with:

scripts/validate_templates.sh

For release QA, generate PPTX and SVG preview artifacts with:

scripts/validate_templates.sh --keep-artifacts

To create a local contact sheet for the flagship technical deck:

scripts/render_template_contact_sheet.sh technical-dark

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io