File PublishServices.lua

Functions

PublishServices:computeCollLookup () Call to assure fresh data before looking up collections based on id.
PublishServices:getCollectionByLocalIdentifier (id) Get published collection or set by local identifier.
PublishServices:getCollectionSetByLocalIdentifier (id) Get published collection set by local identifier.
PublishServices:getInfoForPhoto (photo) Get info for photo (not published photo), in format that hopefully won't change too much over time, despite changes in internal implementation..
PublishServices:getInfoForPubColl (pubColl) Get info for published collection, in format that hopefully won't change too much over time, despite changes in internal implementation..
PublishServices:getInfoForPubPhoto (pubPhoto) Get info for published photo, in format that hopefully won't change too much over time, despite changes in internal implementation..
PublishServices:getPublishCollectionInfo (pluginId) Get table of published collections as keys, publish service as value.
PublishServices:getPublishedInfo (targetPhotos, pluginId) Get table of published info (published-photo, published-collection, published-service, indexed by photo.
PublishServices:getPublishedPhotos (pluginId) Get all published photos, across all collections, all services defined for this plugin.
PublishServices:getSelectedPublishedPhotos () Get published photos corresponding to all selected photos.
PublishServices:init (call) Initialize publish service information.
PublishServices:new (t) Constructor for new instance.
PublishServices:newClass (t) Constructor for extending class.


Functions

PublishServices:computeCollLookup ()
Call to assure fresh data before looking up collections based on id.

Usage:

    Called automatically if need be, but can be called externally as part of init. 
PublishServices:getCollectionByLocalIdentifier (id)
Get published collection or set by local identifier.

Parameters:

  • id: local identifier as obtained via sdk, or sql.

Usage:

    ###2 used by sqliteroom's export-collections. 
PublishServices:getCollectionSetByLocalIdentifier (id)
Get published collection set by local identifier.

Parameters:

  • id: local identifier as obtained via sdk, or sql.

Usage:

    ###2 used by sqliteroom's export-collections. 
PublishServices:getInfoForPhoto (photo)
Get info for photo (not published photo), in format that hopefully won't change too much over time, despite changes in internal implementation..

Parameters:

  • photo:

Return value:

    table with pubPhotos, pubSrvSet, pubCollSet, or nil if photo not published.
PublishServices:getInfoForPubColl (pubColl)
Get info for published collection, in format that hopefully won't change too much over time, despite changes in internal implementation..

Parameters:

  • pubColl:

Return value:

    srvInfo (table/structure) srv, pluginId, pubColls, pubPhotos.
PublishServices:getInfoForPubPhoto (pubPhoto)
Get info for published photo, in format that hopefully won't change too much over time, despite changes in internal implementation..

Parameters:

  • pubPhoto:

Usage:

  • srvInfo format: srv, pluginId, pubColls, pubPhotos.
  • pubColl is just LrPublishedCollection. 

Return value:

    table with srvInfo & pubColl.
PublishServices:getPublishCollectionInfo (pluginId)
Get table of published collections as keys, publish service as value.

Parameters:

  • pluginId:
PublishServices:getPublishedInfo (targetPhotos, pluginId)
Get table of published info (published-photo, published-collection, published-service, indexed by photo.

Parameters:

  • targetPhotos:
  • pluginId:
PublishServices:getPublishedPhotos (pluginId)
Get all published photos, across all collections, all services defined for this plugin.

Parameters:

  • pluginId:
PublishServices:getSelectedPublishedPhotos ()
Get published photos corresponding to all selected photos.

Usage:

    ###2 this is used for Photooey & TreePub's config-run and maint-run. 

Return values:

  1. array of published photos from one collection in one service - may be empty, but never nil.
  2. Publish service - may be nil.
  3. Publish collection - may be nil.
PublishServices:init (call)
Initialize publish service information.

Parameters:

  • call:

Usage:

    the initial motivation for this function is to consolidate the variety of similar "get...info" functions which are very similar but slightly different... 
    this function may take a tad longer than *some* (not all) of them, but the hope is to recode such that it's done once upon startup, and again upon demand if necessary.
PublishServices:new (t)
Constructor for new instance.

Parameters:

  • t:

Usage:

    Represents the collection of all publish services defined under for a plugin. 
PublishServices:newClass (t)
Constructor for extending class.

Parameters:

  • t:

Valid XHTML 1.0!