2 Replies Latest reply on Sep 21, 2015 9:58 AM by JackFlint

    Sample code for a publish service?


      I’d like to write my own Publish to Zenfolio plugin. I am aware of Jeff Friedl’s plugin and it words well, it just does not provide the functionality I want.


      I am a lightweight coder but can usually get my way around if I can find some help and a bit of sample code. The problem I’m running into is it seems in this community there are few beginners. I looked for the usual “where do I start” posts posted by people that don’t read the FAQs but didn’t find them. So where does a beginner start? I’d hoped to find a shell or sample code as a starting places for writing a publish service but my searches have found nothing.


      Does anyone have any code they’d like to share or and point me to some sample code for a publish service?


      Thank you,



        • 1. Re: Sample code for a publish service?
          johnrellis Most Valuable Participant

          It's a fairly steep learning curve.  So I recommend not doing the traditional "dive right in and start hacking" but rather some patient reading and learning the language and SDK first -- it will pay off.


          Work through a tutorial on the Lua language: lua-users wiki: Lua Tutorial. It is a very simple language, but in practice being productive with Lua is much different than with other more traditional languages.  Investing a couple of hours learning the language first will save you lots of grief down the road, especially considering the near-complete lack of built-in debugging facilities in LR.


          Install Lua 5.1.4 to get a standalone Lua interpreter for learning the language:


          Windows: luaforwindows - Installation of Lua for the Windows operating systems including many lua libraries. - Google Project H…

          Mac: Command-line interpreter binaries here: LuaBinaries - Browse /5.1.4 at SourceForge.net


          Download the LR SDK.  It contains the "Lightroom SDK 6 Programmer's Guide", which provides a detailed introduction to the SDK.  Spend some time familiarizing yourself with the entire SDK. The SDK also includes source code for the Flickr publishing-service plugin. 


          Either get my debugging toolkit or find the post in this forum that talks about how to connect a particular IDE's debugger to LR.  The debugging toolkit is lighter weight but more limited in capability.  If you try to debug using just print statements, you'll soon end up spending many hours in frustration, given how limited the LR execution environment is.

          • 2. Re: Sample code for a publish service?
            JackFlint Level 1

            Thank you for a very well written and thorough response. I was hoping to "dive right in" as you say but after trying that approach for a short while I had decided your advice is solid. Short of Jeff Friedl giving me a copy of his code. I think this answer fully satisfies my question.