• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

SDK: Change behavior of published collection

Community Beginner ,
Dec 03, 2020 Dec 03, 2020

Copy link to clipboard

Copied

SDK: Can one somehow tweak the behavior of a published collection so it publishes to its parent folder instead of to its own target folder? I want to develop a publish plugin that allows the Lr user to publish to an arbitrary folder tree, for instance looking like this:

Target folder
  foo.jpg
  sub folder
    bar.jpg

 

With the normal behavior of published collections, I get another unwanted folder level generated as the collection itself publishes to a sub folder, for instance like this:

Target folder
  foo.jpg
  Sub folder (from collection set)
    Another sub folder (from collection)
      bar.jpg

 

 

TOPICS
SDK

Views

150

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
LEGEND ,
Dec 03, 2020 Dec 03, 2020

Copy link to clipboard

Copied

I don't know many details of publish services, but what you want to do is certainly possible, e.g. see the Collection Publisher plugin. You could also look at the source code for TreeSyncPublisher by the late Rob Cole. Beware that, though Rob was a competent and prolific developer of plugins, he used his own unique, extensive framework for his plugins, which could make reading his source code a little harder.

 

[Use the blue reply button under the first post to ensure replies sort properly.]

Votes

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
Community Beginner ,
Dec 08, 2020 Dec 08, 2020

Copy link to clipboard

Copied

LATEST

Thanks. It's possible yes, but one has to implement this mechanism manually. It turned out to be rather easy though :-).

 

What bugs me now is that I wish to automatically have a collection created as a child when a collection set is created. To do this, I implement the publishServiceProvider.endDialogForCollectionSetSettings callback, but here's the problem: Even though the documentaiton refers to info.publishedCollectionSet: (LrPublishedCollectionSet) The published collection set object being edited, it's not being passed in the info object, so I have no way to "parent" the automatically created collection. Anyone with experience in this?

 

Votes

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