project clean-up

This commit is contained in:
2023-12-24 14:48:52 -05:00
parent 36273d7151
commit 4fca9b53d3
60 changed files with 33 additions and 1817 deletions

17
scripts/process-images.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
IMG_ORIGINALS="img_original"
IMG_PUBLIC="all_paw_care/static/img"
IMG_SIZES_NAME=("sm" "md" "lg" "xl" "xxl")
IMG_SIZES=("346" "461" "595" "720" "840")
for img in $(find $IMG_ORIGINALS -type f)
do
for ((i=0;i<${#IMG_SIZES_NAME[@]};i++))
do
new_img_path=$(echo "$img" | sed -e "s,img_original\(.*\),$IMG_PUBLIC\1,g" \
-e "s,\.,_${IMG_SIZES_NAME[i]}\.,g")
magick "$img" -filter spline -resize ${IMG_SIZES[i]} "$new_img_path"
done
done