webui_capture.sh 737 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. RESOLUTION="1366,768" # width,height
  3. OUTPUT_DIR="./webui_screenshots"
  4. GIF_OUTPUT="webui_screenshots/output.gif"
  5. DELAY=200 # delay between frames in GIF (ms)
  6. # -----------------------------
  7. # Convert to GIF using ImageMagick
  8. # -----------------------------
  9. # The /visualise/ screenshots are captured at a much taller viewport so the
  10. # full diagram fits in one frame — those are too tall to roll into the
  11. # uniform-size rotating GIF, so we leave them out (they live as standalone
  12. # images in webui_screenshots/ for embedding directly in the README/docs).
  13. echo "Creating GIF..."
  14. convert -delay $DELAY -loop 0 \
  15. $(ls "$OUTPUT_DIR"/*.png | grep -v "_visualise_") \
  16. "$GIF_OUTPUT"
  17. echo "Done! GIF saved to $GIF_OUTPUT"