yeKcim / my_nautilus_scripts

My Nautilus scripts
GNU General Public License v3.0
79 stars 11 forks source link

using exiftool #2

Closed Sadi58 closed 9 years ago

Sadi58 commented 9 years ago

For your information, I have this Nautilus script (which I probably found somewhere and customized a bit) using exiftool instead of jhead which I find useful in converting the ALL UPPERCASE.JPG filenames (from some digital cameras) to lowercase as well as inserting the timestamp at the beginning:

#!/bin/sh
#Nautilus Script to rename EXIF photos and videos with EXIF date and time stamp inserted before filename
for arg
do
 tmp=`echo "$arg" | tr '[A-Z]' '[a-z]'`
 if [ -f $tmp ]
 then
   msg="Add EXIF Timestamp: '$tmp' already exists."
   gdialog --msgbox "$msg" 100 100
 else
  mv "$arg" "$tmp"
  mv -i "$tmp" "$(exiftool -a -s -CreateDate "$tmp" | sed -n '1p' | awk -F ': ' '{print $2}' | sed -e 's/:/-/g' -e 's/ /_/g')_"$tmp""
 fi
done
yeKcim commented 9 years ago

apt-cache search exiftool libimage-exiftool-perl libimage-info-perl apt-cache show libimage-info-perl | grep Installed-Size Installed-Size: 216 apt-cache show libimage-exiftool-perl | grep Installed-Size Installed-Size: 11376 apt-cache show jhead | grep Installed-Size Installed-Size: 119

what the advantage about exiftool instead of jhead?

I could probably test if there is one already installed and use this one… instead of impose my choice

yeKcim commented 9 years ago

because "clear exif tags" use exiftool too… So I commit. Thanks for your comment.