SDK: Change behavior of published collection

Community Beginner ,
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

18

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

SDK: Change behavior of published collection

Community Beginner ,
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

19

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
Dec 03, 2020 0
Most Valuable Participant ,
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.]

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
Reply
Loading...
Dec 03, 2020 0
jAlbum LATEST
Community Beginner ,
Dec 08, 2020

Copy link to clipboard

Copied

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?

 

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
Reply
Loading...
Dec 08, 2020 0