ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: BigBlueBeast on December 04, 2012, 05:03:32 PM

Title: Experimenting with teh .Exiftool_config file
Post by: BigBlueBeast on December 04, 2012, 05:03:32 PM
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
Title: Re: Experimenting with teh .Exiftool_config file
Post by: Phil Harvey on December 05, 2012, 07:22:14 AM
The problem is the semicolon after the curly bracket.  Inside the UserDefined hash, you must use commas as separators.

- Phil
Title: Re: Experimenting with teh .Exiftool_config file
Post by: BigBlueBeast on December 05, 2012, 08:52:51 AM
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
Title: Re: Experimenting with teh .Exiftool_config file
Post by: Phil Harvey on December 05, 2012, 09:34:54 AM
Hi Dave,

Yes.  The .ExifTool_config file is Perl.

- Phil