Experimenting with teh .Exiftool_config file

Started by BigBlueBeast, December 04, 2012, 05:03:32 PM

Previous topic - Next topic

BigBlueBeast

OK getting a syntax error that varies location with changes within last 4 lines, unsure whats happening, thought was simple mixup of normal right paren and right curly braket.

%Image::ExifTool::UserDefined = (
'Image::ExifTool::Composite' => {
    Calc35mm => {
Require => 'copy2:FocalLength',
      ValueConv => '$val * 1.5'},
    LensManufacturer => {
Require => 'LensID',
    ValueConv => '$prt[0] =~ /(pentax|tamron|sigma)/i ? $1 : undef',},
    LensMake => {
    Require => 'LensID',
      ValueConv => '$val =~ /(pentax|tamron|sigma)/i ? $1 : undef',},
};
);
print "LOADED!\n";
1;  #end

Phil Harvey

The problem is the semicolon after the curly bracket.  Inside the UserDefined hash, you must use commas as separators.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

BigBlueBeast

Thanks, btw is the .ExifTool_config based ion a particular language? Would be nice if could use some of the benifits of color coding, collapsable brackets and block commenting instead of using # symbol one line at a time. i find using the sample file so have easy reference while making additions useful learning this.

Thanks again for spotting that was driving me nuts as self inflicted typos tend to do....

Dave

Phil Harvey

Hi Dave,

Yes.  The .ExifTool_config file is Perl.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).