#!/bin/bash # Test Impressive with LOOP mode (for events/kiosks) echo "==========================================" echo " Test: Impressive with LOOP" echo "==========================================" echo "" echo "This tests kiosk/event mode where the" echo "presentation loops continuously." echo "" cd ~/infoscreen-dev PPTX=$(find src/presentation -name "*.pptx" | head -1) if [ -z "$PPTX" ]; then echo "Error: No PPTX file found" exit 1 fi # Convert to PDF PDF="/tmp/impressive_loop_test.pdf" echo "Converting PPTX to PDF..." libreoffice --headless --convert-to pdf --outdir /tmp "$PPTX" > /dev/null 2>&1 PPTX_BASE=$(basename "$PPTX" .pptx) ACTUAL_PDF="/tmp/${PPTX_BASE}.pdf" if [ -f "$ACTUAL_PDF" ]; then cp "$ACTUAL_PDF" "$PDF" fi if [ ! -f "$PDF" ]; then echo "Error: PDF conversion failed" exit 1 fi PAGE_COUNT=$(pdfinfo "$PDF" 2>/dev/null | grep "Pages:" | awk '{print $2}') echo "[OK] PDF ready: $PAGE_COUNT pages" echo "" echo "Starting Impressive in LOOP mode..." echo "" echo "Settings:" echo " - Auto-advance: 3 seconds per slide" echo " - Loop: YES (--wrap)" echo " - Will go: Slide 1 → 2 → 3 → 4 → 5 → 1 → 2 → ..." echo "" echo "What to watch for:" echo " ✅ Advances through all $PAGE_COUNT slides" echo " ✅ After slide $PAGE_COUNT, goes back to slide 1" echo " ✅ Continues looping forever" echo "" echo "Press 'Q' or Escape to quit" echo "" sleep 2 # Start with --wrap for loop mode impressive \ --fullscreen \ --nooverview \ --auto 3 \ --wrap \ --nologo \ "$PDF" echo "" echo "==========================================" echo " Test Complete" echo "==========================================" echo "" read -p "Did it loop back to slide 1 after slide $PAGE_COUNT? (y/n): " worked if [ "$worked" = "y" ]; then echo "" echo "✅ Perfect! Impressive loop mode works!" echo "" echo "This is ideal for:" echo " - Event displays (loop presentation during event)" echo " - Kiosk mode (continuous display)" echo " - Information screens (repeat content)" echo "" echo "Event JSON should use:" echo ' "loop": true' else echo "" echo "Something unexpected?" read -p "What happened?: " issue echo "Issue: $issue" fi rm -f "$PDF"