CtrlK
BlogDocsLog inGet started
Tessl Logo

jbaruch/speaker-toolkit

Six-skill presentation system: ingest talks into a rhetoric vault, run interactive clarification, generate a speaker profile, create presentations that match your documented patterns, produce the deck illustrations + thumbnail visual layer, and publish talk pages to a Jekyll shownotes site. Includes a 102-entry Presentation Patterns taxonomy (91 observable, 11 unobservable go-live items) for scoring, brainstorming, and go-live preparation.

86

1.24x
Quality

92%

Does it follow best practices?

Impact

86%

1.24x

Average score across 26 eval scenarios

SecuritybySnyk

Advisory

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

build-deck.shskills/presentation-creator/scripts/

#!/bin/bash
# build-deck.sh — build a whole deck from a flat op sequence via the real
# PowerPoint app (BuildDeck VBA macro). The unified creation engine that retires
# strip-template.py + the MCP structural walk: it opens the template, removes its
# demo slides, and builds the deck from the ops. See rules/deck-editing-rules.md
# and references/deckops-spec.md. macOS + Microsoft PowerPoint only.
#
# The agent emits the op sequence from outline.yaml / slides.md (layout,
# placeholder, and content choices are judgment), validates it with
# validate-deckops.py, then runs this.
#
# Usage:
#   build-deck.sh <templatePath> <outPath> <opsFile>
#     templatePath  the .pptx template (uniquely-named copy; its custom layouts +
#                   masters are inherited, its demo slides are stripped)
#     outPath       where to write the built deck
#     opsFile       the op sequence (see references/deckops-spec.md)
#
# Prerequisites: RunDeckOps.bas (which defines BuildDeck) imported into an OPEN
# macro-enabled deck (DeckOps.pptm), macros enabled, Automation consent granted.
set -euo pipefail

if [[ $# -lt 3 ]]; then
  echo "usage: build-deck.sh <templatePath> <outPath> <opsFile>" >&2
  exit 2
fi
TEMPLATE="$1"; OUT="$2"; OPS="$3"
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DRIVER="$HERE/build-deck.applescript"

[[ -f "$TEMPLATE" ]] || { echo "ERROR: template not found: $TEMPLATE — pass a uniquely-named copy of the .pptx template." >&2; exit 1; }
[[ -f "$OPS" ]]      || { echo "ERROR: ops file not found: $OPS — emit it per references/deckops-spec.md and validate with validate-deckops.py." >&2; exit 1; }
[[ -f "$DRIVER" ]]   || { echo "ERROR: driver not found: $DRIVER — reinstall the tile; build-deck.applescript must sit next to this script." >&2; exit 1; }

# Validate the op sequence up front so malformed ops fail fast (with line/op
# context) instead of part-building a deck inside PowerPoint. On failure the
# validator writes errors to stderr and exits non-zero (set -e aborts); on
# success its JSON summary on stdout is discarded — this script emits its own.
python3 "$HERE/validate-deckops.py" "$OPS" >/dev/null

# Sandboxed PowerPoint can't create a file in a Google Drive folder (E_FAIL) —
# stage under the known-writable local root, then move into place with the shell.
# A per-invocation staging dir keeps repeated / concurrent runs from colliding on
# a shared output basename; the trap removes it on exit (success or failure).
STAGE_ROOT="$HOME/.deckops-staging"
mkdir -p "$STAGE_ROOT"
STAGE_DIR="$(mktemp -d "$STAGE_ROOT/build.XXXXXX")"
trap 'rm -rf "$STAGE_DIR"' EXIT
STAGE="$STAGE_DIR/$(basename "$OUT")"

# osascript prints the macro's "BuildDeck returned: N" line — keep it off stdout.
osascript "$DRIVER" "$TEMPLATE" "$STAGE" "$OPS" >&2

if [[ -f "$STAGE" ]]; then
  mkdir -p "$(dirname "$OUT")"
  mv -f "$STAGE" "$OUT"
  python3 -c 'import json,sys; print(json.dumps({"output": sys.argv[1]}))' "$OUT"
else
  echo "ERROR: macro did not produce the staged deck. Check the PowerPoint error dialog, and confirm DeckOps.pptm is open with macros enabled and Automation consent granted — see skills/presentation-creator/references/deck-editing-setup.md." >&2
  exit 1
fi

skills

presentation-creator

SKILL.md

CHANGELOG.md

README.md

tessl.json

tile.json