#!/usr/bin/env bash # Script to create presentation templates # Used by presentations.just module PRESENTATIONS_DIR="$1" NAME="$2" if [ -z "$PRESENTATIONS_DIR" ] || [ -z "$NAME" ]; then echo "Usage: $0 " exit 1 fi echo "Creating presentation: $NAME in $PRESENTATIONS_DIR" # Create presentation directory mkdir -p "$PRESENTATIONS_DIR/$NAME" # Create basic presentation structure cat > "$PRESENTATIONS_DIR/$NAME/$NAME.md" << 'EOF' --- title: PRESENTATION_TITLE author: Your Name date: DATE_PLACEHOLDER theme: default --- # PRESENTATION_TITLE Welcome to your new presentation! --- ## Slide 2 Content goes here - Point 1 - Point 2 - Point 3 --- ## Slide 3 More content --- ## Thank You Questions? EOF # Replace placeholders sed -i.bak "s/PRESENTATION_TITLE/$NAME/g" "$PRESENTATIONS_DIR/$NAME/$NAME.md" sed -i.bak "s/DATE_PLACEHOLDER/$(date +%Y-%m-%d)/g" "$PRESENTATIONS_DIR/$NAME/$NAME.md" rm "$PRESENTATIONS_DIR/$NAME/$NAME.md.bak" 2>/dev/null || true # Create assets directory mkdir -p "$PRESENTATIONS_DIR/$NAME/assets" echo "✅ New presentation '$NAME' created" echo "Edit: $PRESENTATIONS_DIR/$NAME/$NAME.md"