dotfiles

Configuration for the software I use.
git clone https://git.sr.ht/~jbauer/dotfiles
Log | Files | Refs | README | LICENSE

commit 1c12f7e9145a8d06362511d89e90cbcf18b025aa
parent 9d96bdba6c16030bdb3a2f64f86f846c505b4919
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Fri, 18 Jun 2021 22:21:40 -0400

Improvements to optimizeimg

Recognize upper case extensions
delete original exif data-containing files

Diffstat:
M.local/bin/optimizeimg | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.local/bin/optimizeimg b/.local/bin/optimizeimg @@ -19,15 +19,18 @@ optimizepng() exit 1 fi optipng -out "$filename"-optimized.png "$file" - exiftool -all= "$filename"-optimized.png + exiftool -delete_original -all= "$filename"-optimized.png } for file in "$@"; do if [ -f "$file" ]; then case "$file" in *.jpg) filename=$(basename "$file" .jpg); optimizejpg ;; + *.JPG) filename=$(basename "$file" .jpg); optimizejpg ;; *.jpeg) filename=$(basename "$file" .jpeg); optimizejpg ;; + *.JPEG) filename=$(basename "$file" .jpeg); optimizejpg ;; *.png) filename=$(basename "$file" .png); optimizepng ;; + *.PNG) filename=$(basename "$file" .png); optimizepng ;; *) filename=$(basename "$file" .png) echo "The provided file is not a JPG or PNG, it will be converted to a PNG and optimized with optipng."