Re: EXIFPlot: EXIF and bining

Replies:

  • None.

Parents:

Script orgy.

Le 07 d�c. 2003, � 13:37, Ted Guild a �crit :
> for i in `ls *jpg`; do
>     jhead $i | egrep -q '^Orientation' && orientator $i
> done
>

I'm using a small script similar to others I guess

#!/bin/sh
# photodated.sh
# Quick and dirty script by Stephanie Troeth
#  updated by Karl Dubost
# We expect one argument only
if [ $# != 1 ]; then
        echo ""
        echo "Usage: iphotocleanup.sh <root-dir>"
        echo ""
        echo "This program:-"
        echo "  * ensures that your photo files have the last modified
time of when they were taken (according to EXIF DateTimeOriginal) and
put them in dated space"
        exit 1
fi


rootdir=$1

# Here we find all the photo files and changed the last modified date
according
# to the relevant EXIF information in each photo file.
#
# I've put in a filter for DCP*.JPG or IMG*.JPG because my photos are
named
# that way by my cameras. You might have to change this bit to whatever
suits
# your file.

list=`find $1 -iname "*.JPG" -print`
for file in $list
{
        echo "Touching $file"

        datepath=`epinfo $file | grep DateTimeOriginal | sed
's/DateTimeOriginal
=//g;s/"//g;' | awk '{print $1}'|sed 's/:/\//g'`

        phototime=`epinfo $file | grep DateTimeOriginal | sed
's/DateTimeOrigina
l=//g;s/"//g;' | awk '{print $2}'|sed 's/:/-/g'`

        mkdir -p "$HOME/Pictures/$datepath/"
        filename="$HOME/Pictures/$datepath/pic$phototime.jpg"
        echo "move to $filename"
        mv $file $filename
      }



HURL: fogo mailing list archives, maintained by Gerald Oskoboiny