tilde-town-website/gbcamera/generate_gallery_html.sh

19 lines
330 B
Bash
Executable File

#!/bin/sh
cat ./html_header
for image_dir in $(find -type d | egrep -v "^\.\$" | sort -r); do
date=$(echo "$image_dir" | xargs basename)
echo "<h3>$date</h3>"
echo "<ul>"
for image_file in $(find $image_dir -type f | sort); do
echo "<li><img src='$image_file'></li>"
done
echo "</ul>"
done
cat ./html_footer