Move a keyword into or out from a parent using the SDK

Participant ,
Aug 18, 2022 Aug 18, 2022

Copy link to clipboard

Copied

The title basically sums up what I want to do.  I have a long, ugly keyword list that I want to tidy up.  My thought is I would write code to do this rather than spend frustrating hours trying to do it with the GUI.

 

I see that I can create a keyword and at that time give it a parent (or not) and so in theory, I could find the old keyword, get the set of photos that have that keyword, create the new keyword, assign the new keyword to the photos, and then delete the old keyword.

 

I'm hoping there is an kinder gentler way of doing this.

 

TOPICS
macOS , SDK

Views

24

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Aug 18, 2022 Aug 18, 2022

"I see that I can create a keyword and at that time give it a parent (or not) and so in theory, I could find the old keyword, get the set of photos that have that keyword, create the new keyword, assign the new keyword to the photos, and then delete the old keyword."

 

Can't do any better than that, unfortunately.    I submitted a feature request ten years ago for adding additional methods to LrKeyword that's been ignored:

https://community.adobe.com/t5/lightroom-classic-ideas/lightroom-sdk-small-enhancement-to-lrkeyword-to-relieve-pressure-from-users/idi-p/12249298

Likes

Translate

Translate
LEGEND ,
Aug 18, 2022 Aug 18, 2022

Copy link to clipboard

Copied

"I see that I can create a keyword and at that time give it a parent (or not) and so in theory, I could find the old keyword, get the set of photos that have that keyword, create the new keyword, assign the new keyword to the photos, and then delete the old keyword."

 

Can't do any better than that, unfortunately.    I submitted a feature request ten years ago for adding additional methods to LrKeyword that's been ignored:

https://community.adobe.com/t5/lightroom-classic-ideas/lightroom-sdk-small-enhancement-to-lrkeyword-...

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 19, 2022 Aug 19, 2022

Copy link to clipboard

Copied

LATEST

For anyone following along, please note that my description above is incomplete.  The children (as well as the photos) of the original keyword would need to be "moved" (hence, created and their attributes, photos, and children copied) as well thus to do this correctly, it would need to be recursive.

 

Sigh!  time to start typing.

 

Oh, also, please correct me if I'm wrong but I can not find a delete keyword, destroy keyword, purge keywords, etc within the SDK so my tact is to do the "Purge Unused" via the GUI after the fact.  Again... sigh!!!!

 

It is almost as half baked as Lua itself: second possibly only to Pearl 5 for being strutural and OO schizophrenic and inadequate and incomplete in either personality.

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines