#!/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] # Modified: # Fri 21 January 2022, 02:29:56 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