autocompletion?

Started by Alan Clifford, November 15, 2019, 06:06:42 PM

Previous topic - Next topic

Alan Clifford

I seem to type datetimeoriginal and xmp:datetimeoriginal rather a lot.

There seems to be two ways around this:  I could learn how to set up autocompletion for exiftool or somehow make dto and xmp:dto work as synonyms.  Any pointers as to how I would go about creating the latter?

StarGeek

Create a shortcut
%Image::ExifTool::UserDefined::Shortcuts = (
MyDTO => ['EXIF:DateTimeOriginal','XMP:DateTimeOriginal'],
);


Writes to both tags with a single assignment. And will list both tags with
exiftool -mydto <FileOrDir>
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Alan Clifford

Quote from: StarGeek on November 15, 2019, 06:11:24 PM
Create a shortcut

Thanks for that, I'll investigate further.  I don't want to write to both of them as they can be different.

StarGeek

You can just make separate shortcuts for both.  DTO and XDTO for example.  Myself, rather than type out DateTimeOriginal everytime, I have a shortcut of DTO that points to DateTimeOriginal.  I do this with any long tag name that I use a lot, e.g. HS for HierarchicalSubject, CapAb for Caption-Abstract, etc.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

Or you can just have StarGeek's DTO shortcut, and use -dto and/or -xmp:dto in your commands.

%Image::ExifTool::UserDefined::Shortcuts = (
    DTO => 'DateTimeOriginal',
);


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

Alan Clifford

Thanks Stargeek and Phil.  That is perfect.  I wish I'd asked a long time ago.

Alan Clifford

exiftool -a -dto -fileorder xmp:dto -ext jpg -ext mov .

That is so much easier.