# LR/Transporter - Preserving Parent/Child Keyword Relationships on Export



## abourre (Feb 10, 2016)

Hello folks,

I've been using Lightroom to manage the photos taken by the project management team on a large-scale construction project over the last three years. I've amassed 15,000+ photos, and now it's time to turn them over to the client. I need the metadata to be accessible even if a copy of Lightroom isn't, so LR/Transporter is a godsend... its ability to export sidecar text files is exactly what I need. However I've run into some issues when using the Tokens, and after spending some time on Google and searching the forums here I haven't found a solution.

I have photos of 764 structures we erected that are all labelled numerically. All of them were also numerically *relabelled* at some point during the project. I need to preserve *both* the new and old numerical labels, and due to time constraints the simplest way was just to dump a bunch of numbers under a meaningful parent keyword. So I have a lot of photos that have multiple numerical keywords, and those numerical keywords are only meaningful in relation to their parent keyword. A given photo can have keywords that look like this:

"North Structure Number > 005
Final Structure Number > 336"

My problem is that I can't get LR/Transporter to preserve the parent/child relationship between those keywords on export. Instead it will only write them to the text file in numerical/alphabetical order. For the example above, the data written to the sidecar text file would look like this:

"005, 336, Final Structure Number, North Structure Number"

Clearly that is less than ideal. I've been unable to work out a solution on my own. Thoughts/assistance would be much appreciated.

Thank you for your time.


----------



## rob211 (Feb 11, 2016)

I'm not sure, but I think you're writing to sidecars, right?

I don't believe LR/Transporter does keyword hierarchies for the summary text. In XML in the normal sidecars that Lr generates the hierarchies are listed in a separate space from regular keywords. They are in <lr:hierarchicalSubject> as "North Structure|005". Not all applications can understand hierarchies. Perhaps if you told LR/Transporter to use "|" as a separator you'd get what you want; if Lr sees a list of regular keywords with that separator it treats the list as a hierarchy.


----------



## tspear (Feb 11, 2016)

Why write to a side car file?
Just export them as jpeg files with the keywords embedded.

Tim


----------



## abourre (Feb 11, 2016)

Tried it but no dice. Thanks, though.


----------



## abourre (Feb 11, 2016)

They were taken as jpeg files, and I have embedded the metadata into the files, but for whatever reason OS X doesn't like to read that a lot of the time, and I need this to work on a variety of systems, also for people who are not very technically proficient. I'm building as much redundancy into it as I can.


----------



## tspear (Feb 11, 2016)

A potential work around. Look at exiftool 
Use a script to loop through all the files calling exiftool and output all the values.
I would do it as a bash shell script, but Apple Automator would probably also work.

Tim


----------



## PhilBurton (Feb 12, 2016)

tspear said:


> A potential work around. Look at exiftool
> Use a script to loop through all the files calling exiftool and output all the values.
> I would do it as a bash shell script, but Apple Automator would probably also work.
> 
> Tim



What if some of the users are on Windows?  Bash?  Apple Automator? :shock:


----------



## tspear (Feb 12, 2016)

PhilBurton said:


> What if some of the users are on Windows?  Bash?  Apple Automator? :shock:



Well, the OP has Mac in his profile. 
Windows users can install cygwin, or use cmd files or a powershell script.

My Windows batch programming skills are kinda rusty thought. I switched to linux on the servers over a decade ago....

Tim


----------



## rob211 (Feb 12, 2016)

abourre said:


> Tried it but no dice. Thanks, though.



"it"? OS X reads metadata in JPEGS. Always. If it's not showing there is probably something wrong. BUT note it doesn't read all metadata, since there is a lot of metadata that is proprietary (like MakerNotes from cameras) or that OS ignores (like hierarchical keywords).

If the point of what you are doing is to make hierarchies available to say Spotlight, that ain't gonna happen. The Mac OS (well, Finder) will see a LIST delimited by commas, NOT a hierarchy. Whether it's in a sidecar, a DNG, a TIFF or a JPEG.

If you need that info as North Structure Number > 005 then you're gonna have to concatenate that into a single keyword "North Structure Number 005" which would then be part of the comma delimited list. John Beardsworth's Search Replace Transfer might help; it can write keywords to locations for example.


----------



## abourre (Feb 15, 2016)

rob211 said:


> "it"? OS X reads metadata in JPEGS. Always. If it's not showing there is probably something wrong. BUT note it doesn't read all metadata, since there is a lot of metadata that is proprietary (like MakerNotes from cameras) or that OS ignores (like hierarchical keywords).
> 
> If the point of what you are doing is to make hierarchies available to say Spotlight, that ain't gonna happen. The Mac OS (well, Finder) will see a LIST delimited by commas, NOT a hierarchy. Whether it's in a sidecar, a DNG, a TIFF or a JPEG.
> 
> If you need that info as North Structure Number > 005 then you're gonna have to concatenate that into a single keyword "North Structure Number 005" which would then be part of the comma delimited list. John Beardsworth's Search Replace Transfer might help; it can write keywords to locations for example.



"It" as in I tried using your separator suggestion for LR/Transporter and the plugin didn't write to the sidecar file the way you suggested it might; it treated the vertical line as though it were no different from a comma or semicolon or any other random character.

I have saved the metadata to the JPG files and keywords are not displaying *at all* in OS X. And by *at all* I mean on any of the jpg files. Any of them. But they are being displayed by Windows Explorer, which is confusing me like crazy.

I came to the same conclusion regarding concatenation. I'll give Search Replace Transfer a shot, but if it doesn't work (although looking at it I have no idea why it wouldn't) then I simply don't have time to try anything else. I've already spent twice the number of hours I had available to me trying to solve this, and I need to move on to other project tasks.

I appreciate everyone's help/suggestions.


----------



## rob211 (Feb 15, 2016)

abourre said:


> "It" as in I tried using your separator suggestion for LR/Transporter and the plugin didn't write to the sidecar file the way you suggested it might; it treated the vertical line as though it were no different from a comma or semicolon or any other random character.
> 
> I have saved the metadata to the JPG files and keywords are not displaying *at all* in OS X. And by *at all* I mean on any of the jpg files. Any of them. But they are being displayed by Windows Explorer, which is confusing me like crazy.
> 
> ...



Let me back up a bit then.

There are two types of keywords, regular IPTC keywords (flat ones), and hierarchical keywords. They are stored differently, even if the same keywords appear in each. Not all applications or systems recognize the hierarchical ones. Lr displays the hierarchical ones, and when you write "mammal>dog" as a hierarchy it adds both, so "mammal, dog" and "mammal | dog" is the result in XMP. The Mac OS and many apps would only see "mammal, dog." LR/Transporter might strip the "|" or might not, or maybe just doesn't deal  with it. But its' LR that interprets that separator for purposes of hierarchies. For example, type "building | cathedral | Notre Dame" into the keyword box in Lr and see what happens.

LR/Transporter doesn't export hierarchical keywords, only flattened keywords. So any list it generates with be "mammal, dog." I doubt there's anything in it that will help you.

Perhaps you should upload an offending JPEG or the exif/IPTC data from exiftool and we can analyze what's going wrong, since adding keywords should at least produce the flat keyword list.

And just export your Lr keyword list to a spreadsheet, and then concatenate. Add that to the hierarchy, and then import the list. The trick would be to get Lr to apply say "building 123" to building>123; I'm not sure but maybe "building 123>building>123" would work since you'd still be able to find 123, then delete the child keywords leaving just the concatenated ones. Or something like that. Or just a  lot of copy pasting in Lr's keyword list; at least you'd know that would work.


----------

