ExifTool Forum

ExifTool => Archives => Topic started by: Archive on May 12, 2010, 08:54:32 AM

Title: linebreaks in imagedescription field
Post by: Archive on May 12, 2010, 08:54:32 AM
[Originally posted by linuxuser on 2009-03-10 11:28:18-07]

How do I have to code linebreaks in the  imagedescription field?

I tried
 
Code:
\n\n\ and \r\r
.

I would like to do in a linux shell:

Code:
exiftool -q -q -s -s -s -IMAGEDESCRIPTION "$FILE" >> "$DESCRTXT"
Code:
cat "$DESCRTXT"

and the linebreaks should be shown.
Title: Re: linebreaks in imagedescription field
Post by: Archive on May 12, 2010, 08:54:32 AM
[Originally posted by exiftool on 2009-03-10 14:10:10-07]

There are many different ways to do this.  I suggest using the -p
option, where '$/' represents a newline in the format string:

Code:
exiftool -p '$imagedescription$/' "$FILE" >> "$DESCRTXT"

- Phil
Title: Re: linebreaks in imagedescription field
Post by: Archive on May 12, 2010, 08:54:32 AM
[Originally posted by linuxuser on 2009-03-10 15:19:50-07]

Thanks Phil!

Since you said, that there are more possibilities, what would you recommend, if 2 in a current imagedescription field should mark 2 paragraphs/linebreaks?
Title: Re: linebreaks in imagedescription field
Post by: Archive on May 12, 2010, 08:54:32 AM
[Originally posted by linuxuser on 2009-03-10 15:24:04-07]

Sorry for the typo, it should be:

Since you said, that there are more possibilities, what would you recommend, if 2 space characters in a current imagedescription field should mark 2 paragraphs/linebreaks in the output of exiftool?
Title: Re: linebreaks in imagedescription field
Post by: Archive on May 12, 2010, 08:54:32 AM
[Originally posted by exiftool on 2009-03-10 15:55:34-07]

If I understand you correctly, you're now talking about translating
characters in output tag values.  Creating a user-defined Composite
tag is the way to do this.

- Phil