will take a list of files and go through them with eog as a viewer.
[feisty_meow.git] / 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 (file)
index 0000000..7fa7133
--- /dev/null
@@ -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
+