diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2022-05-21 14:07:14 -0600 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2022-05-21 14:07:14 -0600 |
commit | f3340ae5f4ac6c60823bf4d14e1fcdbeaaec353c (patch) | |
tree | 41d7eda870083cfa0776d650478ceeb2baee2837 /static/pic-resize.sh | |
parent | 55eb40d4bb489b2b26ab5d0ce2c70c7cb2f766b7 (diff) |
Remove old code related to static, it's not needed anymore
Diffstat (limited to 'static/pic-resize.sh')
-rwxr-xr-x | static/pic-resize.sh | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/static/pic-resize.sh b/static/pic-resize.sh deleted file mode 100755 index 849d395..0000000 --- a/static/pic-resize.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -# requires imagemagick and perl-image-exiftool - -set -e - -widths="500 1000 1500 2000 2500 3000" - -for img in $@; do - echo $img - - # make target directories - dir=$(dirname "$img") # gets directory - for targetWidth in $widths; do - mkdir -p $dir/${targetWidth}px - done - - # get width - width=$(identify "$img" | awk '{print $3}' | cut -dx -f1) - echo -e "\toriginal width: $width" - - echo -e "\tremoving metadata" - exiftool -all= "$img" - rm -f "${img}_original" # exiftool makes a copy of the original, delete it - - for targetWidth in $widths; do - targetFile=$dir/${targetWidth}px/$(basename "$img") - echo -en "\tresizing into $targetFile... " - if [ "$targetWidth" -ge "$width" ]; then - echo "skipping, original image too small" - continue - elif [ -e "$targetFile" ]; then - echo "skipping, target file exists" - continue - fi - convert "$img" -resize $targetWidth "$targetFile" - echo "done" - done -done |