initial commit of new version

This commit is contained in:
tms
2026-10-04 18:24:18 -04:00
parent 994fac96e0
commit 57220375a3
43 changed files with 3429 additions and 1 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/bin/bash
# Directory containing the JPEG images
IMG_DIR="img"
# Check if the directory exists
if [ ! -d "$IMG_DIR" ]; then
echo "Directory $IMG_DIR does not exist."
exit 1
fi
# Loop through each JPEG file in the directory
for img_file in "$IMG_DIR"/*.jpg "$IMG_DIR"/*.jpeg; do
# Check if the file exists (to handle cases where no files match the pattern)
if [ -f "$img_file" ]; then
# Extract the base name of the file (without extension)
base_name=$(basename "$img_file" | cut -d. -f1)
# Create a folder with the same base name
mkdir -p "$IMG_DIR/$base_name"
# Move the image file into the folder
mv "$img_file" "$IMG_DIR/$base_name/"
echo "Moved $img_file to $IMG_DIR/$base_name/"
fi
done
echo "Done!"