ExifTool Forum

ExifTool => Developers => Topic started by: evilaro on November 21, 2012, 12:34:08 PM

Title: Putting a separation
Post by: evilaro on November 21, 2012, 12:34:08 PM

Hi:

Using this code I get correctelly the filename and the keyword.

      RUN(FALSE, 'exiftool -p  "$filename $keywords" "&MDIR" > R2.txt')

But first gives me the filename as asked, and then the keywords

Something like:

mypicture hometown.jpg my house, Dogs, cities

So extracting the keywords is easy, but the first one (specially if is a 2 word) is to me unsure.

I thought to add something to separate ...example

      RUN(FALSE, 'exiftool -p  "$filename ::: $keywords" "&MDIR" > R2.txt')

And I get
mypicture hometown.jpg ::: My house, Dogs, cities

Which is what I wanted.... IS THIS ACEPTABLE?

Thanks
Emilio

Title: Re: Putting a separation
Post by: Phil Harvey on November 21, 2012, 01:17:25 PM
Hi Emilio,

I'm confused about the question.  You are the one who needs to decide if this format is acceptable.  ExifTool doesn't care one way or the other what format you specify.

- Phil
Title: Re: Putting a separation
Post by: evilaro on November 21, 2012, 01:25:48 PM
Phil:

I feel I have not placed the question correctely.

Putting something like the    :::  in the middel of the tag,  does not seemed to me as correct... but it works.

My question is if doing that will not break any rules of exiftool?

Emilio




Quote from: Phil Harvey on November 21, 2012, 01:17:25 PM
Hi Emilio,

I'm confused about the question.  You are the one who needs to decide if this format is acceptable.  ExifTool doesn't care one way or the other what format you specify.

- Phil
Title: Re: Putting a separation
Post by: Phil Harvey on November 21, 2012, 01:51:20 PM
Hi Emilio,

It is not possible to break the syntax rules for a -p format string.  The only result is that it doesn't behave as expected.  But since it behaves as you want, then everything is OK.

If you get an unexpected result, you should also get a message like "Tag not defined" (when the tag you want really exists).  If this ever happens, just put curly brackets around the tag name.  ie. ${filename}

- Phil

Title: Re: Putting a separation
Post by: evilaro on November 21, 2012, 02:34:07 PM
Phil:

Wonderful

Thanks

Emilio