Feature Request: Tiny app help/manual update (-s)

Started by Martin Z, November 04, 2023, 03:04:32 AM

Previous topic - Next topic

Martin Z

Hi Phil, StarGeek & Co,

The next time you are releasing a new version of EXIFtool, can I ask that you add 1 line to the app manual / help please - specifically...

      -php                             Export tags as a PHP Array
>>>>  -s                               Use tag names instead of tag descriptions
      -s[NUM]     (-short)             Short output format
      -S          (-veryShort)         Very short output format

It's a really useful option, but I always struggle to remember it and miss it when I am reading through the app help to try and remember what it is.

I realise it's a tiny update, but hopefully you agree it would be a useful note to add... Likewise, no urgency on this, just whenever you get time is fine!

Cheers!

wywh

It is mentioned in the beginning of the FAQ.

"To print the tag names instead instead of descriptions, use the -s option when extracting information"

https://exiftool.org/faq.html#Q2

"-a allows duplicate tags to be extracted, -G1 shows the family 1 group name (ie. the location) of each tag, and -s shows the tag names instead of their descriptions"

https://exiftool.org/faq.html#Q3

Martin Z

Quote from: wywh on November 04, 2023, 04:56:56 AMIt is mentioned in the beginning of the FAQ.
"To print the tag names instead instead of descriptions, use the -s option when extracting information"

Sure, I appreciate that but my point is more that when I am using the EXIFtool CLI and want to check a parameter, I generally use the CLI's help via EXIFtool --help etc.

Invariably what happens at the moment is...
[1] Skim through the parameters part of the help text (but not see it)
[2] Repeat this step and go through more thoroughly to make sure I don't miss it
[3] Get confused as I know there is a way to get EXIFtool to use tag names but can't find any mention of it
[4] Do various searches in the forum as know I have asked about this before
[5] Eventually find out how to do it via an FAQ or thread where someone's asked about this specifically
... and would be great if I could just do [1] above, instead of all [1-5]!

While I know any change rarely "just needs 1 line of code to fix", I think this request is very simple and hopefully shouldn't take literally more than a minute or two to add (plus I've said that this isn't urgent and so can be added whenever Phil / others have time)... So, with genuine respect, I don't think this request needs a load of discussion or pushback, as I'm just asking for 1-line to be added to the help text.

StarGeek

-s is covered by -s[NUM].  The use of brackets means that what is inside the brackets is optional.  This is a decades old standard of command line syntax.  See Wikipedia or Microsoft.

Edit: I got curious as to how old the syntax actually is.  I found a manual of the CP/M OS copyright 1984 that included it
* 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

While my heart goes out for you, I don't like the idea of including the -s option twice in the documentation.

However, I am open to improving the short description, which is currently:

    Short output format

If you can come up with a description that works better for you in 40 characters or less I'll consider changing it.

- Phil

Note that if I do a quick search for "tag names" in the documenation, I quickly find this paragraph:

            Note:  Descriptions, not tag names, are shown by default when
            extracting information.  Use the -s option to see the tag names
            instead.


also, in the long description for the -s[NUM] option, there is this:

                -s1 or -s        - print tag names instead of descriptions

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

Martin Z

Quote from: Phil Harvey on November 05, 2023, 04:48:07 PMIf you can come up with a description that works better for you in 40 characters or less I'll consider changing it.
OK sure.
 
I don't know how the short format parameter works overall TBH (what -s2 or -s3 do for example) but will read up and get back to you with a suggested amendment that covers "using tag names" and "short output formats".

Martin Z

PS - I'm aware of the convention of using [ ] for optional arguments.

In the interim (or as a quick, general amendment) given your point on the [ ] being optional, and so a number doesn't have to be given, how about...

-s[Num]  |  Use -s to show tagnames rather than desc. Use -s[0..?] for short output format.

Let me know if that works or you would prefer more specificity, and like I saw I can find out more about -s and what things like -s3 do, etc.

Phil Harvey

Quote from: Martin Z on November 06, 2023, 08:34:30 AM-s[Num]  |  Use -s to show tagnames rather than desc. Use -s[0..?] for short output format.

That description is 79 characters long.  We need to get it down to 40 for the "Option Overview" section.

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

Martin Z

OK, it is a little hard to make concise as am trying to describe two things (i.e. to me: using tagnames is an explicit option that is different to outputting in a short format), hence my original thinking to add a line to the help.

But assuming you still would rather not add a separate line for -s on it's own, how about...

Use tagnames. Add [Num] for short output
(39 chars)

Martin Z

EDIT: Re-reading my message from the other day, I realised it might have come across passive agressive, which I didn't mean.

REVISED WORDING: If you're still keen to have -s descriped in one line, the best wording I can think of would be: Use tagnames. Add [Num] for short output (39 chars)

Would this work?

Phil Harvey

Hi Martin,

I appreciate the attempt, but it doesn't sit well with me.

Maybe something like this?:

        Short output format (-s for tag names)

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

Martin Z

Quote from: Phil Harvey on November 09, 2023, 02:09:50 PMI appreciate the attempt, but it doesn't sit well with me.
Maybe something like this?
Short output format (-s for tag names)
- Phil

Hi Phil, I think that's a fair compromise.

As I say, I usually end up scanning through the list of parameters and their descriptions - so as long as tag names is in there somewhere, I think that should be fine. Thanks! 👍🏼

Phil Harvey

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

Martin Z

PS -- On a (somewhat) related note...

Is there a help option that just lists the parameter options?... This is usually the main thing I want to get, but currently I am using EXIFtool --help which...
  • Prints the help in pages
  • Prints the entire help manual

Don't get me wrong, the above two things are both very helpful is many situations - my point is just that if there was an option along the lines of EXIFtool --param-help that would print out all the parameters and their 1-line descriptions, that would be great for me!

Is there any option like this?

Phil Harvey

Sorry, there is no way to list only the command-line options, but they do come near the start of the application documentation.

I know you didn't ask this, but you can list the API options with this command:

exiftool -api

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