mirror of
https://github.com/ff4500/utilities.git
synced 2026-07-01 11:47:04 -05:00
19 lines
427 B
Bash
Executable File
19 lines
427 B
Bash
Executable File
#!/bin/bash
|
|
|
|
input_dir="$HOME/Desktop/Definitely_NOT_Porn"
|
|
exts="jpg,jpeg,JPG,png,gif"
|
|
output_dir="$HOME/Desktop/notporn_thumbnails"
|
|
|
|
if [ ! -d "$output_dir" ]; then
|
|
mkdir -p "$output_dir"
|
|
fi
|
|
|
|
for notpornimages in $input_dir/*."{$exts}" ; do
|
|
convert "$notpornimages" \
|
|
-thumbnail 250x250^ \
|
|
-gravity center \
|
|
-extent 250x250 \
|
|
-set filename:fname '%t_thumb' \
|
|
"$output_dir"/'%[filename:fname].jpg'
|
|
done
|