From 9d21606dc4e2e500a1d19de95c2e65ad26e816f5 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Thu, 4 Feb 2021 10:34:13 +0100 Subject: Add photo_list --- gal | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gal b/gal index 3ceaa13..b395a73 100755 --- a/gal +++ b/gal @@ -19,6 +19,7 @@ mkdir -p $2/{photos,thumbs} ## Generate index.html menu file cp style.css $OUTPUT +echo "Generating index.html" cat > $OUTPUT/index.html < @@ -54,10 +55,23 @@ cat >> $OUTPUT/index.html < EOF +## Generate photo_list +echo "Generating photo_list" + +[ -f $OUTPUT/photo_list ] && echo "Replacing existing photo_list" && rm $OUTPUT/photo_list + +for f in $PHOTOS/*.{jpg,JPG,jpeg,JPEG,png,PNG}; do + filename=$(basename $f) + [ -f $f ] && cat >> $OUTPUT/photo_list <