Files
wehub-resource-sync 8cb1f9f479
Publish SDK (PyPI) / publish (push) Has been cancelled
Publish SDK (npm) / publish (@aionui/officecli-sdk) (push) Has been cancelled
SDK smoke / smoke (windows-latest) (push) Has been cancelled
Publish SDK (npm) / publish (@officecli/officecli-sdk) (push) Has been cancelled
Publish SDK (npm) / publish (@officecli/sdk) (push) Has been cancelled
Publish SDK (npm) / publish (officecli-sdk) (push) Has been cancelled
SDK smoke / smoke (macos-latest) (push) Has been cancelled
SDK smoke / smoke (ubuntu-latest) (push) Has been cancelled
Skill parity / diff (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:09:29 +08:00

43 lines
1.8 KiB
Bash
Executable File

#!/bin/bash
# Random transitions — PowerPoint picks the actual animation at render
# time, so the .pptx only captures the intent, not the specific motion.
#
# newsflash — newspaper-style spin-and-zoom (one fixed animation, but
# grouped with the random family because it's pre-2010
# legacy and rarely used outside this slot).
# random — PowerPoint chooses a random transition each time you
# enter Slide Show mode.
# NOTE: intentionally NO `set -e`. Like the SDK twin's doc.batch, this script
# tolerates forward-compat 'UNSUPPORTED props' warnings (officecli exit 2) and
# keeps building so the full document is produced.
DIR="$(dirname "$0")"
PPTX="$DIR/transitions-random.pptx"
rm -f "$PPTX"
officecli create "$PPTX"
officecli open "$PPTX"
n=0
add_demo_slide() {
n=$((n+1))
local trans=$1 title=$2 bg=$3
officecli add "$PPTX" / --type slide
officecli add "$PPTX" "/slide[$n]" --type shape \
--prop x=0 --prop y=0 --prop width=33.87cm --prop height=19.05cm --prop fill="$bg"
officecli add "$PPTX" "/slide[$n]" --type shape \
--prop text="$title" --prop size=44 --prop bold=true --prop color=FFFFFF --prop align=center \
--prop x=2cm --prop y=7cm --prop width=29.87cm --prop height=4cm
if [ -n "$trans" ]; then officecli set "$PPTX" "/slide[$n]" --prop transition="$trans"; fi
}
add_demo_slide "" "Random Transitions" "1F3864"
add_demo_slide "newsflash" "newsflash" "C00000"
# Run Slide Show twice on this deck — slide 3 should animate differently each time.
add_demo_slide "random" "random (re-rolls each play)" "2E75B6"
add_demo_slide "random" "random (different again)" "7030A0"
officecli close "$PPTX"
officecli validate "$PPTX"
echo "Created: $PPTX"