nice new tool to show version of feisty meow
[feisty_meow.git] / scripts / multimedia / maybe_zap_pic.sh
1 #!/bin/bash
2
3 # goes through a list of pictures, first showing the picture to you,
4 # and then nagging you for each one if you want to delete it or not.
5 # it's intended for culling a bunch of vacation pictures.  it does a
6 # safe delete on the file in case there's a mistake, so if feisty meow
7 # scripts are set up properly, these will be in your del-keeper folder.
8
9 # go through all the files that were passed in, if any.
10 for i in "$@"; do
11   file="$i"
12   echo "showing file: $file"
13   # display the file with eog.
14   eog "$file"
15   # now ask the big question: to whack or not to whack?
16   echo "whack this file? (y/N)"
17   read inputtext
18   # a few things mean yes here.
19   if [ "$inputtext" == "y" -o "$inputtext" == "Y" -o "$inputtext" == "yes" ]; then
20     echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
21     echo "$(date): deleting $file."
22     perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl "$file"
23     echo "$(date): done deleting $file."
24     echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
25   else
26     echo not deleting.
27   fi
28 done
29