ExifTool Forum

ExifTool => Archives => Topic started by: Archive on May 12, 2010, 08:54:15 AM

Title: AEBBracketValue
Post by: Archive on May 12, 2010, 08:54:15 AM
[Originally posted by tamias on 2008-02-08 11:46:00-08]

Hi!
When I run this test it works fine for me:
Code:
do shell script "exiftool -S -s  '-AEBBracketValue' /Volumes/work/image.JPG"
"+5/3"

When I run this test it don't works:
Code:
set output to do shell script "exiftool -S -s  '-AutoExposureBracketing' /Volumes/work/image.JPG"
   if output contains "5" then
      do shell script "exiftool '-filename<${AEBBracketValue}_%f.%e' /Volumes/work/image.JPG -directory=/Volumes/work/+AV/"
        end if

For example this woks fine too:
Code:
set output to do shell script "exiftool -S -s  '-AutoExposureBracketing' /Volumes/work/image.JPG"
   if output does not contain "X" then
      do shell script "exiftool '-filename<${AEBBracketValue}_%f.%e' /Volumes/work/image.JPG -directory=/Volumes/work/+AV/"
        end if
Thanks!
Mikle
Title: Re: AEBBracketValue
Post by: Archive on May 12, 2010, 08:54:15 AM
[Originally posted by exiftool on 2008-02-08 13:46:50-08]

Hi Mikle,

I'm not sure I can help here.  It seems the only difference between
what works and what doesn't work is the condition:

Code:
      if output contains "5" then

Either the output doesn't contain "5", or this statement isn't
doing what you expected.  But I'm no AppleScript expert, so
I can't help if that is the case.

- Phil
Title: Re: AEBBracketValue
Post by: Archive on May 12, 2010, 08:54:15 AM
[Originally posted by tamias on 2008-02-08 16:38:19-08]

Phil!

What is the format of a message  "+5/3" ?

Why not find  "5" to "+5/3" , or "0" to "0",  " 1" to  "123" ect

Yes , I am still weak in the AppleScript, but it may cause in a format of  "+5/3" ?

Thanks!

 Mikle
Title: Re: AEBBracketValue
Post by: Archive on May 12, 2010, 08:54:15 AM
[Originally posted by exiftool on 2008-02-08 19:44:52-08]

I'm sorry, but I don't understand what you are asking.
I have never written any AppleScript, so I can't help at all
with that.

- Phil
Title: Re: AEBBracketValue
Post by: Archive on May 12, 2010, 08:54:15 AM
[Originally posted by tamias on 2008-02-09 00:35:26-08]

Phil!

I have a series of  images with AutoExposureBracketing (+AV , 0 ,+AV) in /IMAGE folder.

I want a script that can sort and move photos to folders:  /IMAGE/+AV/, /IMAGE/0/ and /IMAGE/-AV/.

Help me write it on the shell. I should be grateful!

P.S.  I use MetaDataMove, but I do not need a folder with different names. It does so

I need a folders with permanent names to automate the operation of the APP program in processing   HDR QTVR panoramas.

/IMAGE - is temporary folder and files will be erased.

Mikle
Title: Re: AEBBracketValue
Post by: Archive on May 12, 2010, 08:54:15 AM
[Originally posted by exiftool on 2008-02-09 14:06:28-08]

I'm not clear about why you want a script to do this
since you should be able to do it with a single
exiftool command.  Your biggest problem is that
the AEBBracketValue's contain slashes (ie. "+5/3"),
which of course will create additional subdirectories
when used in a filename, which isn't what you want.
To avoid this, you could create a
user-defined
tag
(MyAEB)
which prints the AEBBracketValue as a floating point
with one decimal place.  And you can use another user-defined
tag to set the directory name you want:

Code:
'Image::ExifTool::Composite' => {
        MyAEB => {
            Desire => 'AEBBracketValue',
            ValueConv => '$val ? sprintf("%+.1f", $val) : "0"',
        },
        MyDir => {
            Desire => 'AEBBracketValue',
            ValueConv => '$val ? ($val > 0 ? "+AV" : "-AV") : "0"',
        },
},

Then a command like this should move and rename the files as you
indicated:

Code:
exiftool "-filename</IMAGE/${MyDir}/${MyAEB}_%f.%e" /IMAGE

- Phil
Title: Re: AEBBracketValue
Post by: Archive on May 12, 2010, 08:54:15 AM
[Originally posted by tamias on 2008-02-09 16:44:55-08]

Thanks Phil!

I will try to use it.