ExifTool Forum

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

Title: formating exiftool output
Post by: Archive on May 12, 2010, 08:54:28 AM
[Originally posted by yair on 2008-11-17 01:36:08-08]

hi, first thanks for the great tool.

i need to extract XMP:subject and filename of several subdirs into a single txt file
i used:
Code:
exiftool.exe -filename "-XMP:subject" -w txt *.jpg

to get many txt files like:

Code:
File Name                       : Copy1-52.jpg
Subject                         : knees, bees, deez

but i need it to be formatted like -

Code:
Copy1-52.jpg knees, bees, deez
Copy1-62.jpg knees, gees, peez
Copy1-82.jpg knees, yees, heez
hope its a silly simple question.
Title: Re: formating exiftool output
Post by: Archive on May 12, 2010, 08:54:28 AM
[Originally posted by bogdan on 2008-11-17 05:12:36-08]

Hi,

Something like this should work:
Code:
exiftool -p "$Filename $XMP:subect" -w txt *.jpg

Bogdan
Title: Re: formating exiftool output
Post by: Archive on May 12, 2010, 08:54:28 AM
[Originally posted by exiftool on 2008-11-17 11:52:57-08]

Thanks Bogdan, but I think he wants a single text file:

Code:
exiftool -filename -subject -T -r -ext jpg DIR

Where DIR is the root directory containing the JPG images

- Phil
Title: Re: formating exiftool output
Post by: Archive on May 12, 2010, 08:54:28 AM
[Originally posted by exiftool on 2008-11-17 11:53:46-08]

Oops.  I forgot to pipe the output to a text file:

Code:
exiftool -filename -subject -T -r -ext jpg DIR > out.txt

- Phil
Title: Re: formating exiftool output
Post by: Archive on May 12, 2010, 08:54:28 AM
[Originally posted by louiscar on 2008-11-17 14:24:14-08]

Actually I think what I wanted to do was to have a batch file which I could operate on all files or just specific ones.

I did find that Bogdan's suggestion worked but I had a hell of a time trying to get the inverse to happen, however, I had that working using -TagsFromfile.

So my idea would be - take out crs data to preserve it :
Code:

exiftool -o %%f.mie -xmp-crs:all *.nef

and of course I could replace *.nef with %1 abd %2 to allow operation on one or all files in the folder.

To copy them back I was using:
Code:

exiftool -tagsFromFile %%f.mie -@ LRcrs.args  *.nef

the args file just contains:

-XMP-crs:all > xmp-crs:all
This could be the last operation before archiving the file

However, it ocurred to me that the whole reason I am have this problem is because I was embedding the sidecar files as a whole, thus replacing everything and since Acdsee doesn't preserve the LR data if I copied its sidecar after an edit using:

Code:

exiftool "-xmp<=%%d/%%f.xmp" -ext nef .
I'd lose the LR data.

So now I'm thinking that what I should really be doing is just copying the  xmp / ipct data (keywords, categories etc) from each sidecar file when generated by LR or Acdsee then I only have to burn write xmp:crs or -Acdsee:rpp once (if I've done any raw processing in either).

Sorry for the dumbness, I've only been at this for a week and pretty rusty on the command line Smiley

but I think it would be good to be able to keep raw settings with the file as well as do any keywording in either app and keep them syncronized between them all.

 
What does excite me is exactly what's stopped me spending a lot of time on keywording in the past. App dependency! I really don't like the idea of changing an app in the future and having to do keywording all over again because they were all stored in an external database.
Title: Re: formating exiftool output
Post by: Archive on May 12, 2010, 08:54:28 AM
[Originally posted by louiscar on 2008-11-17 16:11:13-08]

Humble apologies for replying to what I thought was one of my threads. I'd delete it if I could find out how. Trying to do too many things at once here. Just disregard my response on this subject.
Title: Re: formating exiftool output
Post by: Archive on May 12, 2010, 08:54:28 AM
[Originally posted by yair on 2008-11-17 17:51:12-08]

thanks guys, for a second i thought i was a victim of an identity theft Smiley