question to -api filter= and -n option

Started by herb, September 05, 2018, 11:17:51 AM

Previous topic - Next topic

herb

Hello Phil,

I use the filter api in order to get CarriageReturn and LineFeed as printable characters \r and \n.
See https://exiftool.org/forum/index.php/topic,9445.0.html.

As long as I ask for an output that is print converted all works fine.

But in case of option -n is used filter does not work and Exiftool sends CR and LF converted to dot.

What must be done that -api filter=RepNL also works with -n option?
CR and LF is only used inside strings and as far as I know for string there is no print conversion.

Thanks for your help in advance
Best regards
Herb

Phil Harvey

Hi Herb,

The -filter option does not apply to -n values.  There is no way around this.

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

StarGeek

What exactly are you trying to do?  Would it be possible to target specific tags with the # rather than use the -n option?
* 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).

herb

Hello Phil,

thanks for your clear answer.

Hello StarGeek,

at the moment I am looking for the best (and easiest) solution to get CarriageReturn and LineFeed inside string-tags back as printable characters.
The filter function Replace_NL you proposed to use was a very good start - thanks again for it - but it does not work with option -n.

Thanks again and
best regards
Herb

StarGeek

The point I'm questioning is whether you need the -n option or if you can use the hashtag varient of the -n option.  For example, if you're extracting TAG1, TAG2, and TAG3, and tags 1 and 3 are strings that need Replace_NL, but you need the raw value of TAG2, you could use -TAG2# to get that rather than use -n.

* 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).

herb

Hello StarGeek,

thanks for your proposals. Yes I know the feature with # and end of tagname.
But one goal is also to e.g. display all tags or all tags of a group: ( e.g. -xmp-dc:all)

Thanks and
Best Regards
Herb