#!/bin/zsh # Place this file as the sibling of directory 'img/' which contains all the images. # The output will be 'img.xml' which changes the backgrounds every 24 hours (86400 secs). cd "${0:h}" ( cat < 2024 01 01 00 00 00 EOF shuf -e "$PWD"/img/* | while read -r i; do echo Found: $i >&2 cat < 86400.0 $i EOF done cat < EOF ) > img.xml