specifying -short (output format) in %Image::ExifTool::UserDefined::Options

Started by BrianP, September 22, 2015, 01:07:44 PM

Previous topic - Next topic

BrianP

After installing cygwin, the program search preference for .BAT before .EXE is gone. Now `exiftool` executes exiftool.exe instead of my customized exiftool.bat file.

Good thing there is a .ExifTool_config file!

Except, it does not understand SHORT, to show tags as a single word rather than as a sentence.

d:\pic\fractasia.best> c:/bin/bat/exiftool_.exe -config c:/bin/.ExifTool_config  -colortemp* D:/pic/fractasia.best/m/us-2012.0208-25766.p8-nymph.jpg
Color Temperature               : 0.0

>> Works with `-s`
d:\pic\fractasia.best> c:/bin/bat/exiftool_.exe -config c:/bin/.ExifTool_config  -colortemp* D:/pic/fractasia.best/m/us-2012.0208-25766.p8-nymph.jpg  -s
ColorTemperature                : 0.0

d:\pic\fractasia.best>grep -i short c:/bin/.ExifTool_config  | grep -iv shortcut
        Short       => 1         # No s p a c e s in tag_names!

# Specify default ExifTool option values
# (see the Options function documentation for available options)
%Image::ExifTool::UserDefined::Options = (
    CoordFormat => '%.6f',   # change default GPS coordinate format
    Duplicates  => 0,        # make -a default for the exiftool app
    GeoMaxHDOP  => 4,        # ignore GPS fixes with HDOP > 4
    Sort        => 'Alpha',  # Random default?
    Short       => 1         # No s p a c e s in tag_names!
);

I have tried cap and lower case. There is no "Options function" for Short.


Phil Harvey

No.  The output formatting is done by the app, not the API, so there is no API option for this.

I suggest renaming "exiftool.bat" to "et.bat" or something simple like that to avoid the name conflict and make it easier to type at the same time.

- 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 ($).

BrianP

Phil,

That was my second scheme, however the et namespace is already monopolized by my "standard", concise set of tags.

Is there no way to forbid ExifTool from expanding single words into sentences? I would be happy with NEVER seeing DefringePurpleHueHi expanded to Defringe                                               Purple               Hue   Hi

Is it the case that command line options are added to the %Image::ExifTool::UserDefined::Options hash on an as-needed basis? It would seem cromulent that the preservation/decoration/mangulation/expansation of the tags, the first token(s) in  the report, would be of some, general utility. 

Now, I remember why I didn't have cygwin before :)

    Brian

Phil Harvey

Hi Brian,

In general, ExifTool isn't just expanding the tag names.  These descriptions may be very different from the tag names.  For example, if you are using an alternate language (eg. -lang de).

The UserDefined::Options hash sets API options (see the API documentation).  Some of the command-line options map into API options, but some don't.

- 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 ($).

BrianP

Cygwin set the PATHEXT env_var to prefer .exe over .bat, but .com was first. 

I am not sure what PATHEXT was before, but .bats were preferred over .exes because ExifTool.bat worked calling ExifTool.exe in the same bin directory with  "--a -s -sort %*" options.  I left the system ENV as it was and changed only my users environment.

C:\bin>env | grep PATHEXT
PATHEXT=.BAT;.COM;.EXE;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

I mostly wanted to move what I could into the ExifTool config file to get it all out of my scripts. The -sort and No_Dups (--a) translate. The short tag Format doesn't, but the GPS coordinate format does??   

It looked as though ExifTool were preceding each solitary cap with a space. The description option is a much better method to do this.

ET is BAAACK!

%Image::ExifTool::UserDefined::Options
CoordFormat => '%.6f',   # change default GPS coordinate format