#!/bin/bash # Test Impressive - Python PDF presenter with native auto-advance echo "==========================================" echo " Test: Impressive PDF Presenter" echo "==========================================" echo "" echo "Impressive is a Python-based PDF presenter with" echo "BUILT-IN auto-advance. No xdotool needed!" echo "" # Check if impressive is installed if ! command -v impressive &> /dev/null; then echo "Impressive not installed. Installing..." echo "" sudo apt-get update sudo apt-get install -y impressive if [ $? -ne 0 ]; then echo "Error: Could not install impressive" exit 1 fi fi echo "Impressive installed: $(which impressive)" echo "" # Convert PPTX to PDF cd ~/infoscreen-dev PPTX=$(find src/presentation -name "*.pptx" | head -1) if [ -z "$PPTX" ]; then echo "Error: No PPTX file found" exit 1 fi PDF="/tmp/impressive_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 with 3-second auto-advance..." echo "" echo "Impressive features:" echo " - Native auto-advance (no xdotool!)" echo " - Fullscreen by default" echo " - Professional transitions" echo " - Loop support" echo "" echo "Controls:" echo " Right Arrow / Space = Next slide" echo " Left Arrow = Previous slide" echo " Q / Escape = Quit" echo "" sleep 2 # Start Impressive with auto-advance # --auto 3 = auto-advance every 3 seconds # --fullscreen = fullscreen mode # --nooverview = skip overview at start # --autoquit = quit after last slide (for non-loop mode) impressive \ --fullscreen \ --auto 3 \ --nooverview \ --autoquit \ "$PDF" echo "" echo "==========================================" echo " Test Complete" echo "==========================================" echo "" read -p "Did it work perfectly? (y/n): " worked if [ "$worked" = "y" ]; then echo "" echo "✅ EXCELLENT! Impressive is your solution!" echo "" echo "Why Impressive is perfect:" echo " ✅ Built-in auto-advance (no xdotool hacks)" echo " ✅ Reliable on Raspberry Pi" echo " ✅ Professional presenter tool" echo " ✅ Supports loop mode natively" echo " ✅ Fast and lightweight" echo "" echo "Next steps:" echo " 1. Update Display Manager to use Impressive" echo " 2. Simple command: impressive --auto N --fullscreen file.pdf" echo " 3. Works for both PPTX (convert to PDF) and PDF files" else echo "" echo "What didn't work?" read -p "Describe the issue: " issue echo "Issue: $issue" fi rm -f "$PDF"