This brings to mind a feature request. It would be easier to notice that a particular tag was not present if the tags were output in alphabetically sorted order. I presume that currently, they are output in the order in which they appear in the image file. They should still be grouped by type, though, making it somewhat useless to just pipe through sort. This would also make it easier to visually scan for a particular tag.
This is also a feature request for exiftoolgui, which could implement it independently. (Presumably exiftoolgui just shows the tags in the order in which exiftool outputs them.) (I am not cross posting to the gui forum.)
Maybe this feature already exists, but I was not clever enough to find it.
--peter
PH Edit: This topic was split from this thread (https://exiftool.org/forum/index.php/topic,3834.0.html).
Hi Peter,
This is a good suggestion, and it would be fairly easy for me to implement an output which is sorted by tag name as you suggest. However, I have one concern: The default output gives descriptions, not tag names (an obvious example being the Model tag, which has "Camera Model Name" as a description). Sorting on the descriptions would be more difficult, and would depend on the setting of the -lang option. Also, presumably the output should be sorted by tag name if the -s option is used.
It would be possible to sort on descriptions, but it wouldn't be and easy change and it may incur a performance penalty. I will look into this.
- Phil
Edit: I did a quick test, and sorting by descriptions slows down exiftool by about 7%. Not too bad a hit I suppose. I'll consider adding this feature.
Hello Phil, hello Peter,
I hope it is ok that I add a comment to the sorting feature request.
I am working on a tool, that sends e.g. the following command to Exiftool
exiftool -f -G0 -tagname1 -tagname2 <file>.
I use -f option because parsing the Exiftool output my tool needs an unchanged order like
[group1] tagdescription1 tagvalue1
[group2] tagdescription2 tagvalue2
It would be very helpful taht this reminds unchanged.
Thanks in advance.
Herb
PH Edit: Changed the topic name for the new thread.
Hi Herb,
Yes, the current behaviour will not change.
- Phil
I should have made it clear that I was suggesting a new option, not a change in the default behavior.
--peter
Hi Peter,
I have a working version now that I am testing. This version adds a new -sort option, which sorts the output based on the tag descriptions by default, or the tag names if combined with the -s option. It seems to work well, and I think it should make a useful addition to the feature set.
- Phil
Quote from: Phil Harvey on January 17, 2012, 12:48:02 PM
Hi Peter,
I have a working version now that I am testing. This version adds a new -sort option, which sorts the output based on the tag descriptions by default, or the tag names if combined with the -s option. It seems to work well, and I think it should make a useful addition to the feature set.
- Phil
Great! Thanks. Next I guess I will have to work on Bogdan to include it as an option.
--peter
Hi,
I have commented your request in GUI section. In short: thinking about this now, I really can't understand why I've waited that long with this in GUI.. laziness, perhaps? :)
And I was just thinking to "publish" new GUI v5.0 .. now I'm glad I didn't -this sort thing was worth a delay, IMO.
Btw. I'm quite excited with new GUIv5 8)
Bogdan
Quote from: BogdanH on January 17, 2012, 02:43:37 PM
Btw. I'm quite excited with new GUIv5 8)
Me too. :)
- Phil
Quote from: Phil Harvey on January 17, 2012, 07:47:22 AM
Edit: I did a quick test, and sorting by descriptions slows down exiftool by about 7%. Not too bad a hit I suppose. I'll consider adding this feature.
Good news: I have beaten the performance hit down to less than 1.5% through some optimization of the sorting function. :)
I hope to release this new version (8.76) within the next day or two.
- Phil
Good news indeed -I'll wait.
Bogdan
You didn't have to wait long... version 8.76 is now available. :)
- Phil
Downloaded and allready implemented in new GUI :)
Your sorting is actually better in behaviour than I expected, i.e: even if option "show hex tag ID prefix" (can't recall the op-code right now) is chosen, tags remain sorted by names (and not by ID, as one would assume) -great.
Not to mention, that sorting within groups is very welcome. And finally, in real usage (forget benchmaks), I didn't notice any speed differences. Good job.
Bogdan
Hi Bogdan,
Thanks for the feedback. I'm happy that it is working well for you.
- Phil