From ad0ce3f89fcb4e06393aa84e342c2745aef72da8 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Sun, 13 May 2012 17:52:03 -0400 Subject: [PATCH] will take a list of files and go through them with eog as a viewer. after each is viewed, the user will be asked if the file should be deleted (on the console). if they say yes, it is zapped into the del keep by the safe del script. regardless, the next picture is then displayed, etc. useful for trolling through vast reams of vacation photos and deleting the bad ones. --- scripts/multimedia/maybe_zap_pic.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 scripts/multimedia/maybe_zap_pic.sh diff --git a/scripts/multimedia/maybe_zap_pic.sh b/scripts/multimedia/maybe_zap_pic.sh new file mode 100644 index 00000000..7fa7133b --- /dev/null +++ b/scripts/multimedia/maybe_zap_pic.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# goes through a list of pictures, first showing the picture to you, +# and then nagging you for each one if you want to delete it or not. +# it's intended for culling a bunch of vacation pictures. it does a +# safe delete on the file in case there's a mistake, so if feisty meow +# scripts are set up properly, these will be in your del-keeper folder. + +# go through all the files that were passed in, if any. +for i in "$@"; do + file="$i" + echo "showing file: $file" + # display the file with eog. + eog "$file" + # now ask the big question: to whack or not to whack? + echo "whack this file? (y/N)" + read line + # a few things mean yes here. + if [ "$line" == "y" -o "$line" == "Y" -o "$line" == "yes" ]; then + echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" + echo "$(date): deleting $file." + perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl "$file" + echo "$(date): done deleting $file." + echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" + else + echo not deleting. + fi +done + -- 2.34.1