From 6304066cd6303a8548329c3c68cd8cf55d0af7a2 Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 2 Mar 2025 09:59:25 -0500 Subject: [PATCH] clean up old files --- gallery/classic/updateGallery1.sh | 71 ------------------------------- 1 file changed, 71 deletions(-) delete mode 100755 gallery/classic/updateGallery1.sh diff --git a/gallery/classic/updateGallery1.sh b/gallery/classic/updateGallery1.sh deleted file mode 100755 index 0a404d7..0000000 --- a/gallery/classic/updateGallery1.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash - -# Check if input is provided -if [ -z "$1" ]; then - echo "Usage: $0 DIRECTORY" - exit 1 -fi - -DIRECTORY=$1 - -# Check if directory exists -if [ ! -d "$DIRECTORY" ]; then - echo "Error: Directory does not exist." - exit 1 -fi - -# Set variables -IMAGE_ DIR="$DIRECTORY" -OUTPUT_FILE="index.html" - -# Generate gallery with captions -count=1 -for img in $IMAGE_DIR/*.{jpg,jpeg,png,gif,webp}; do - if [ -f "$img" ]; then - filename=$(basename "$img") - caption_file="${filename%.*}.txt" - - # Read caption if available, otherwise use default - if [ -f "$caption_file" ]; then - caption=$(cat "$caption_file") - else - caption="" - fi - - echo "
" >> $OUTPUT_FILE - echo "
\"$caption\"
" >> $OUTPUT_FILE - echo "
$caption
" >> $OUTPUT_FILE - echo "
" >> $OUTPUT_FILE - - count=$((count+1)) - fi -done - -# Add closing tags for the gallery -cat >> $OUTPUT_FILE < - -
-
- Copyright © Beach Party Balloons - All images & content are property of Beach Party Balloons. Use of images without written permission is prohibited. -
-
- - -EOL - -# Add lightbox overlays with captions -count=1 -for img in $IMAGE_DIR/*.{jpg,jpeg,png,gif,webp}; do - if [ -f "$img" ]; then - filename=$(basename "$img") - caption_file="${filename%.*}.txt" - - if [ -f "$caption_file" ]; then - caption=$(cat "$caption_file") - else - caption="" - fi - - echo "
\ No newline at end of file