TheRepoClub-DotFiles/localbin/.local/bin/bulkresize

40 lines
801 B
Plaintext
Raw Normal View History

2021-01-09 12:38:56 -05:00
#!/usr/bin/env bash
2022-01-20 15:38:50 -05:00
# -*-coding:utf-8 -*-
# Auto updated?
# Yes
#File :
# bulkresize
2022-01-21 08:38:27 -05:00
#Author:
# The-Repo-Club [wayne6324@gmail.com]
#Github:
2022-01-20 15:38:50 -05:00
# https://github.com/The-Repo-Club/
#
# Created:
# Sun 31 October 2022, 01:17:37 AM [GMT]
2022-01-21 08:38:27 -05:00
# Modified:
# Fri 21 January 2022, 02:29:56 PM [GMT]
2022-01-20 15:38:50 -05:00
#
# 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)
#
2021-01-09 12:38:56 -05:00
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