Last active
August 20, 2023 23:04
-
-
Save madprops/6d5dc03aaed936dc3e20d03b87e90d74 to your computer and use it in GitHub Desktop.
Add this to a dolphin actions .desktop file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
input="$1" | |
output="${input%.*}.jpg" | |
counter=1 | |
while [ -e "$output" ]; do | |
output="${input%.*}($counter).jpg" | |
counter=$((counter + 1)) | |
done | |
convert -quality 80 "$input" "$output" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment