Adobe 65007312 Programming Guide - Page 35
Creating Export and Publish Services, Defining an export service
UPC - 883919154398
View all Adobe 65007312 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 35 highlights
3 Creating Export and Publish Services Plug-ins can customize Lightroom's export and publish behavior. You can: X Create an Export Filter that modifies a photo after Lightroom performs the initial rendering, but before it is passed to it final export destination. X Alter the rendering process, or define post-processing actions for rendered photos. X Send rendered images to locations other than files on the local computer. X Customize the Export and Publishing Manager dialogs by adding or removing sections. Creating an export or publish service Lightroom offers two customizable mechanisms for transferring photos to an external location: export and publish. X Export is a one-time operation: the user selects some photos, the photos are rendered once and transferred to their destination. Lightroom maintains no further record of the export (although some plug-ins do retain such a record via custom metadata). By default, Lightroom provides export services for a user-selected location on the local hard drive and CD/DVD drive. Plug-ins can define export services to extend this support to other destinations (typically web services or devices). See "Defining an export service" on page 35. X Publish is similar to export, but represents an ongoing relationship between Lightroom and the destination. You publish a collection (or many collections) of photos to a location when you want them to stay up to date as you change the photos. To publish, the user establishes a connection to a destination (typically, but not necessarily, a web service) in the Publishing Manager dialog. By default, Lightroom provides publish service support for user-selected locations on the local hard drive and Flickr. As with export services, plug-ins can define publish services to extend this support to other destinations. See "Defining a publish service" on page 39. Though they are presented differently, there is a lot in common between these two mechanisms and they share much of the same API. Export services are the simpler of the two, so we'll start by describing this API, then describe additional functionality that is specific to publish services. Defining an export service To define the functionality of your export service, write a Lua script that returns a table; each predefined entry in the table describes a specific type of customization. You then declare the name of your service and associate it with the defining script, in the same way you declare any plug-in. To declare an Export Service Provider, add the following block to your Info.lua file: LrExportServiceProvider = { title = "Service Name", -- this string appears as the Export destination file = "MyExportServiceProvider.lua", -- the service definition script builtInPresetsDir = "myPresets", -- an optional subfolder for presets }, 35