CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

jbaruch/speaker-toolkit

Twelve skills for conference speakers covering rhetoric analysis, talk authoring, deck building and export, CFP submissions, publishing, illustrations, shownotes, screencast production, and vertical shorts, informed by a 113-entry Presentation Patterns taxonomy (83 observable: 64 patterns + 19 antipatterns; 30 unobservable: 21 patterns + 9 antipatterns).

Quality

92%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Medium

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

run-deck-ops.shskills/presentation-creator/scripts/

#!/bin/bash
# run-deck-ops.sh — trim / reorder / cross-deck-import a PowerPoint .pptx via the
# real PowerPoint app (RunDeckOps VBA macro), preserving per-slide backgrounds.
# See rules/deck-editing-rules.md. macOS + Microsoft PowerPoint only.
#
# Usage:
#   run-deck-ops.sh <basePath> <outPath> <importSpec> <orderStr> <replaceStr>
#
#   basePath    .pptx opened as the build container (output inherits its slide
#               size + masters). Use a UNIQUELY-NAMED copy — PowerPoint keys
#               open decks by filename, so base/import/output must not collide.
#   outPath     final destination (may be a Google Drive folder; see staging note)
#   importSpec  "" or "alias=/path[;alias2=/path2]" for cross-deck slide imports
#   orderStr    final slide sequence, e.g. "BASE:1 BASE:2 voxxed:13 BASE:49"
#               (token = <alias>:<1-based slide #>; alias BASE = basePath)
#   replaceStr  "" or "find=>to||find2=>to2" global text replacements
#
# Prerequisites: RunDeckOps.bas imported into an OPEN macro-enabled deck
# (e.g. DeckOps.pptm), VBA macros enabled, Automation consent granted once.
set -euo pipefail

if [[ $# -lt 5 ]]; then
  echo "usage: run-deck-ops.sh <basePath> <outPath> <importSpec> <orderStr> <replaceStr>" >&2
  exit 2
fi
BASE="$1"; OUT="$2"; IMPORT="$3"; ORDER="$4"; REPLACE="$5"
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$HERE/ensure-drivers.sh"   # restore .applescript/.bas drivers tessl install strips
source "$HERE/container-stage.sh"  # stage Google-Drive inputs into the container (no Powerbox prompts)
source "$HERE/deck-text-bridge.sh"  # keep non-ASCII text intact across `run VB macro`
DRIVER="$HERE/run-deck-ops.applescript"

[[ -f "$BASE" ]]   || { echo "ERROR: base deck not found: $BASE — pass a uniquely-named copy of the source .pptx as <basePath>." >&2; exit 1; }
[[ -f "$DRIVER" ]] || { echo "ERROR: driver not found: $DRIVER — reinstall the plugin; run-deck-ops.applescript must sit next to this script." >&2; exit 1; }

# Sandboxed PowerPoint can READ from a Google Drive File-Provider folder but
# fails to CREATE a new file there via VBA (E_FAIL -2147467259). So save to a
# LOCAL staging path, then move into the destination with the shell, which
# writes to Drive normally.
STAGE_DIR="$HOME/.deckops-staging"
mkdir -p "$STAGE_DIR"
STAGE="$OUT_STAGE_DIR/$(basename "$OUT")"
rm -f "$STAGE"

IMPORT="$(stage_import_spec "$IMPORT")"
REPLACE="$(bridge_text "$REPLACE")"

echo "staging -> $STAGE"
osascript "$DRIVER" "$(stage_base "$BASE")" "$STAGE" "$IMPORT" "$ORDER" "$REPLACE"

if [[ -f "$STAGE" ]]; then
  mkdir -p "$(dirname "$OUT")"
  mv -f "$STAGE" "$OUT"
  echo "done -> $OUT"
else
  echo "ERROR: macro did not produce the staged file. On a macro error the osascript step above already aborted with the VBA Err.Description; reaching here means the macro returned without error but wrote no file. Confirm DeckOps.pptm is open with macros enabled and Automation consent granted — see skills/presentation-builder/references/deck-editing-setup.md." >&2
  exit 1
fi

skills

presentation-creator

SKILL.md

README.md

tile.json