To further jarnoh's response:
tells the OS to send url to Lr app (Lr is registered protocol handler).
tells Lr which plugin to send url to.
no further parsing is done - i.e. you can emulate CGI or roll-yer-own whatever...
in other words, the 'string' is yours to do with as you see fit - neither OS nor Lr will try to help nor interfere...
Thanks for your responses, really helpful.
You bet, but note, it is theoretically possible for the url to come wrapped in quotes (dunno where I got this notion, or if/when it ever happens even..). Here's the contents of one of my URL handling files:
URLHandler = function(url)
if url:sub( 1, 1 ) == '"' then -- double-quote wrapped format.
cookmarks:urlHandler( url:sub( 2, -2 ) ) -- strip double-quotes.
cookmarks:urlHandler( url )
The thread Jarnoh linked to included a post about the double quote issue. I have seen it happen on occassions so you do need to check for it - at least in LR 3 and LR 4.
I thought the URLHandler was documented in the LR 4 API Guide PDF (need to double check). If not Jeffrey Friedl posted about it some time ago and included enough information to know how to use it.