TheRepoClub-DotFiles/localbin/.local/bin/bulkresize
2022-01-20 20:38:50 +00:00

40 lines
806 B
Bash
Executable File

#!/usr/bin/env bash
# -*-coding:utf-8 -*-
# Auto updated?
# Yes
#File :
# bulkresize
#Author :
# The-Repo-Club [wayne6324:gmail.com]
#Github :
# https://github.com/The-Repo-Club/
#
# Created:
# Sun 31 October 2022, 01:17:37 AM [GMT]
# Last edited:
# Thu 20 January 2022, 05:18:37 PM [GMT]
#
# Description:
# Run this script by setting it at: # Nemo -> Edit -> Preferences ->
# Behavior -> Bulk Resize # Select multiple files in Nemo and hit F2 (or
# right-click -> Resize)
#
size=1920x1080
# Catch user input for file type.
echo "Enter the file extension for your image files:"
# Store user input in $files.
read ext
# Resize images.
for img in *.$ext; do
mkdir -p "resize"
convert -resize $size! "$img" "resize/$img"
printf "converting %s to %s\n" "$img" "$size"
done