Working with a Wedding Client’s Photo Selects in Lightroom 2
I recently found out I was the official photographer for my brother’s wedding only two days before the actual event. Aside from the stress of my first wedding shoot (for a family member no less – no pressure…) I also had to work through the logistics of processing and publishing the reams of photos captured. Living over 1000 kilometers away from the client made this process a little more difficult than for your average wedding shoot.
The foundation of my digital photography workflow is Adobe’s Photoshop Lightroom 2 (LR2). I was confident my core workflow was up to the task but what I was missing was a way to publish the proofs, record the client selects, and bring that information back into LR2 so I could complete my editing tasks.
The Turning Gate’s Client Response Gallery provided a simple solution to the problem. The web engine plugin generated my proof gallery for me, and when family members selected photos I would receive an email with the details:
Selections: EX_20080914_153823, EX_20080914_154715
GalleryTitle: Test Gallery
Name: Sample
Email: <
The standard process for loading the selections into LR2 involves copying part of the selection line, pasting it into an LR2 find or filter field, then working with the displayed photos. I found this a little cumbersome given the volume of selection emails (> 40) I ended up receiving, so I wrote a perl script to turn the gallery email body into smart albums that could be imported directly into LR2.
The script to convert TTG Client Response gallery selection emails into smart collections can be downloaded here: ttgclient.pl. If you are a Windows user and don’t have perl installed already you can download it here.
Using the script is as simple as:
- Copy the body of a TTG Client Response gallery selection email into a text file. (Example: input)
- Run the ttgclient.pl script, passing one or more filenames as parameters.
e.g. on Windowsc:\> ttgclient.pl ttgclient-sample.txt
e.g. on Mac (assumes perl is in you path)
Smart Collection TTGClient-Sample-Selections.lrsmcol ready for import to LR2.perl ./ttgclient.pl ttgclient-sample.txt
Smart Collection TTGClient-Sample-Selections.lrsmcol ready for import to LR2. - Open LR2’s library module.
- In the Collections panel, right click on a Collection. Select Import Smart Collection Settings from the context menu, then select the file generated by ttgclient.pl (e.g. TTGClient-Sample-Selections.lrsmcol).
- If the client specified ratings for any of the photos you will also have a separate import files generated for each rating level awarded. Repeat the previous step until all of the collections are imported.
You should now have a new Smart Collection (e.g. TTGClient-Sample-Selections) containing all of the selections and rated images included in the email from the gallery.
I hope this helps your workflow as much as it did mine. And thanks to Matt for making such a useful LR2 gallery available for free!
Updated Feb 2009: Added Mac details based upon user feedback
Related Posts:
In: Howto, Software, Web · Tagged with: gallery, lightroom, lr2, plugin, script, smartalbum, Web, workflow
Hi Matt – I found this link via the TTG forum and was wondering if you know whether the Pearl script will work on an Apple Macintosh machine without any further installs?
Seems like a really cool idea and a workflow godsend so fingers crossed?
Good on yer for sharing (even if it doesn’t work)
Reargards
Steve
Hi Steve,
I don’t have access to a Mac myself but apparently Mac OS X v10.3 (Panther) onwards have Perl installed (see http://developer.apple.com/internet/opensource/perl.html ). Even if you have an earlier version that page should contain enough info to help you install it.
I chose Perl for this task because of the Mac factor. LR2 supports both Win and Mac platforms so writing a helper script that supported only one of those didn’t make much sense. So please share your experience with the script, good or bad.
Matt
Cool,
I’ll let you know how I get on. Just need some free time to test it out (some hope 🙂
Cheers Matt.
Steve
Hi Matt,
I tried this on a Mac and got the following errors:
./ttgclient.pl form_data.txt
./ttgclient.pl: line 38: sub: command not found
./ttgclient.pl: line 40: syntax error near unexpected token `(‘
./ttgclient.pl: line 40: ` my $select_album = shift(@_);’
Any ideas?
Many Thanks,
Tom.
Thanks for the script.
I discovered that the input text file MUST use Unix LF conventions. On the Mac, when we save a text file it’s contains the Mac LF convention and this causes the script to fail.
I’m not enough of a Perl programmer to solve this.
The only way I could make it work is to find/replace the Mac line feeds with Unix. It’s the confusion of “\r” and “\n”
@Tom, Sorry for the delay in replying.
On UNIX style systems you will either need to modify the script or explicitly call perl at the command line.
If you insert this as the first line of the script (assuming perl can be found in /bin/perl) your original command line should work:
#! /bin/perl
Alternatively call the script using this command line instead:
/bin/perl ./ttgclient.pl form_data.txt
Hope that resolves the problem for you.
Matt
The link to the ttgclient.pl file isn’t working anymore.
Thanks for fixing it.
Best regards
Hugo
@Hugo,
I just tested all the linked files and they open OK. ttgclient.pl is actually called ttgclient.txt to work around a website issue (I’m sure there is a better way to fix that, but it was quick). Rename it to ttgclient.pl and the rest of the instructions should work fine.
Thanks for your work and offering your scripts.
I haven’t worked with scripts before, so do I just (Windows):
install Pearl
copy ttgclient.pl to text file and rename .txt to .pl, save to c:
copy the email to a text file and save to c: run CMD, and
enter ttgclient.pl filename.txt Smart Collection TTGClient-testname-Selections.lrsmcol ready for import to LR2.
Thanks!
Reid
I’ve installed Pearl and have run the script, but where is .lrsmcol file? If it makes a difference, my windows drive is z:
thanks,
reid
Reid, The steps you listed in the first comment look correct. If you open cmd and run the command
ttgclient.pl filename.txt
, assuming filename.txt contains the email content, it should product the .lrsmcol file in the current directory. That path should be visible in the command prompt and should be something like C:/Documents and Settings/username. MattThanks, I ran it again with the files in the /user/reid folder and it worked! The key seems to be that it had to be in the user folder as I searched my computer and couldn’t find a .lrsmcol file.
Thanks again.
Reid
Thanks for this script. I have modified it to work with TTG Highslide by changing the word Selections: to Image:
Search for:
push(@selections, “$line”) if $line =~ /^Selections: /;
Replace by:
push(@selections, “$line”) if $line =~ /^Image: /;
@Jorge, Thanks for the tip. Haven’t actually looked at TTG Highslide so didn’t even know it was applicable. Might try to come up with a more generic way to have this support all TTG galleries that allow selections.
I run the script on the text file. I look at the .lrsmcol and it contains all the selections found in the txt file. When I import the smartcollection it only adds the last file in the list.
Here is the file:
s = {
internalName = “Kathryn B. Echelberry-Selections”,
title = “Kathryn B. Echelberry-Selections”,
type = “LibrarySmartCollection”,
value = {
{
criteria = “filename”,
operation = “any”,
value = “Colin_10, Colin_11, Colin_12, Colin_13, Colin_16, Colin_18, Colin_24, Colin_25, Colin_28, Colin_29, Colin_30, Colin_34, Colin_Collage2, Colin_40, Colin_42, Colin_48_Edit, Colin_53, Colin_55, Colin_Collage5”,
value2 = “”,
},
combine = “union”,
},
version = 0,
}
Figured it out…the underscores that form to email uses is incorrect. LR uses – when renaming files w/ sequence, which is what I used. I just had to edit the .lrsmcol to change the _ to – and all is good.
@Nico, glad you worked out the issue. Does seem rather strange though. Form to email shouldn’t be modifying the text the gallery passes to it.
Hi, I have three problems.
1) All “-” in filenames are being converted to “_” in the e-mail.
2) When I run the script, the selections are not being generated
into a file. I have to move the Selection statement from in e-mail
below the user info. Just above the first rating set. Then it works
3) When I run the import command, nothing happens as far as I can tell.
No smart collection is created, or if I run it on an existing
smart collection, no settings are updated ?
Even with the “_” issue, I thought I would at least get a collection created that would have the bogus names in it …. any help would be appreciated.
Thanks
@Doug, @Jim, et al. Sorry its taken me a while to get back to you. I’ll try to look into this and see if there are ways to work around the current form to email issues and make the PERL script a little more flexible.
Doug. Lightroom changes – to _ export for web. Solution? Don’t use -, use _ in renaming.
@Sean, thanks for that tidbit! A nasty little “feature” I wasn’t aware of. What makes it worse is the gallery text still shows the correct (original) name even though the underlying file has had its name changed. Not very nice behaviour by the LR SDK.
I changed my normal renaming to using ‘_’. I don’t even ponder it anymore. In fact to get the files, I usually do a search and replace to remove everything but the sequence numbers, and then pop them in the search on the required folder. Slightly long winded, but I find it faster than waiting on a whole library search.
Ok I have downloaded perl for pc and I have tryed this on a mac and pc getting the same error everytime i imput your data discribed above I get the error (Can’t open Smart: no such file or directory)
What am i doing wrong here is what i am typing
ttgclient.pl taylor.txt Smart Collection Taylorcottage.lrsmcol ready for import to LR2
Thanks Rob
@Rob, You only need to type the following:
ttgclient.pl taylor.txt
The other text you are including is actually a customised version of what the command will return when it runs successfully.
So I have been using your pl script quite successfully until today.
I have a Collection Set with 4 collections in them. Each collection had the files renamed. Each collection is representative of a Gallery online. So I have 4 emails w/ collections, 1 for each gallery/collection.
I create the pl output for each, and they’re correct (change the _ to -).
when I import the file it does not collect the correct files for some reason. For example, I have 88 images in my Pre-Ceremony collection and the customer picked 55 of them. I import the file and it collects 106 images.
I can’t figure this one out. 🙁
@Nico, Sorry for the delay.
That does sound like a strange problem. Did you keep the email(s) and the collection files that were created? If you did please let me know and I’ll let you know the address to email them too. I’ll see if I can figure it out.
One more question: You made the comment “they’re correct (change the _ to -)”. Does this mean you are modifying the generated collection my hand to fix the naming? If so one accidentally introduced space might be able to explain this problem because it would create a smaller search string that would match more photos.
PS I think they have fixed the – to _ file renaming problem in the LR3 beta so hopefully we won’t have to deal with this issue for too much longer.
Thank You for the usefull Script.
I too had those ranme Issues which i solved by editing the renaming scheme from – to _
Now it works as it should
@Raimund, Glad you found it useful.
I have a mostly complete revision of this script that has a “safe” mode which works around the need to revise naming schemes. Downside is that it has to be more lax in its checking, so could return photos what weren’t actually selected by the client. If any of you are interested please let me know and I’ll finish and publish it ASAP.
As an aside, I’m pretty sure they have fixed this little bug in the LR3 beta so the TTG galleries (and the others, for that matter) should no longer have this problem. Will double check and make sure.
An updated version of the script has been released, adding support for TTG Highslide galleries and working around the file renaming bug in Lightroom 2. The new home page for the script is here: http://thephotogeek.com/lightroom/ttgclient/
Matt,
Great script, very helpful. Here’s my question: If I receive more than one email from a client with picks, LR2 creates a new Smart Collection for each import. Is this by design, user error on my part, and if not, is there some way to modify the script so that it will import (i.e. append current) the already created smart collection?
@Robert, It creates multiple Smart Collections by design. I’d suggest the best option is for you to select all items in the new Smart Collection, then add them to a regular Collection you create to store the client selects. Once you have done this you can delete the Smart Collection created by the script. This way you can add all of the selects for the client to a single Collection and have complete control over the order in which they appear.
Hi Matt, thanks for sharing this helpful script. I saved a lot of time with it…
Only to thank you Matt, this is incredibly useful script, fixing the only setback that the ttgClientResponse gallery have
@Allan, Thanks!
And for those that are interested I now have access to a Mac so finally might be able to work through the Mac specific script issues.
Has anyone tackled, or considered, using the ttgclient.pl from within the PHP code for the web gallery? I am starting to look into having the client gallery selections sent in the “decoded” format where I can run a MAC script to process through email/lightroom on the fly.
Seems like a logical step, but has anyone already gone down this path with any success?
@Tom, I hadn’t even considered that option and to the best of my knowledge no one has tried it. I’d be happy for Matt to add it into his galleries but he has never mentioned it. Either Matt would need to add it into the main gallery code or end users patch it after it was deployed. The latter would be beyond the skills of many of Matt’s users so I’m not sure whether he would encourage that.
If you do give it a go please let us know the results. There is no rocket science involved in what I’ve done so it should be easy enough to replicate in other languages.