# Lightroom Export/Publish by keyword: use keywords as folders for export/publish



## VanMan (Mar 28, 2011)

Hi,

I am new to LightroomForums. I am also new-ish to Lightroom (have played with it quite a lot, but now trying to use it more sensibly as a DAM).

I am still struggling with the management and "final usage" of photos. Let me explain:

For the more specific usages (organising "portfolio" photos, specific themed exports, working sets, etc) we can use collections, and it works very well. And we can then use these collections as "albums" whenever we want to "use" it, for example export or publish to HDD/Facebook/Flickr. These collections offer full control at the cost of manual work over and above the keyworking. But is it's specific usages, that's acceptible.

But my problem is with more "whole-library" tasks, like exporting/publishing all (rated 3-star and above) images for anything that is not IPTC keyword-organisation search/filtering aware, like a simple burned CD for family or even import to iPad/iPhone. In these cases, ideally files have to be in some structure (maybe using folders) representing a logical organisation to be useful (a single direcotry with 2500+ images is just not useful to anyone but the creator). And this is especially relevant as I am just quick-starting from a folder-organised structure with 1000s of non-Lightroomed non-collectioned images.

For Lightroom "folders" (file sources), you need to export/publish every folder seperately, otherwise it exports/publishes everything in one folder. There are some "tree" export/publish plugins around though, so that helps.

But, seeing as you've put all the effort into keywording photos using hierarchical keyword structures, it would be super-awesome to USE THOSE KEYWORDS to define export/publish folder structures. That way, you could have folders for people by name, and a folders for locations by place name, etc. Ideally, even use nested folders to represent the hierarchical folder structure. And yes, I know photos can have more than one keyword, but personally I would duplicate the file for each keyword (or create links, but not everythign supports that). That way, you have a nice navigatable structure to find anything (by single criteria) you want. Searching for a person in a specific place would have to remain in a slightly more advanced IPTC keyword-organisation search/filtering aware tool.

See: http://www.lightroomqueen.com/commu...to-folders-on-export&highlight=export+keyword

Can anyone help or comment please?

Regards.

Van


----------



## Jim Wilde (Mar 28, 2011)

Hi Van, welcome to the forum.

Not sure I fully understood everything you are saying (especially duplicating a file for every keyword sounds massively over-complicated to me), but I would have thought setting up publish folders based on Smart Collections would allow you to achieve your goals. I publish lots of images (in specific sets) to Flickr, a couple of digital photo frames, and to iTunes for syncing with my iPhone....some of these are simply 'dumb' collections, but many are smart collections which typically use keywords as the inclusion criteria. If necessary, you could create Published Folder Sets which could contain both dumb and smart collections (and which allow nested folders) and the folder when published would be given the name of the published folder.

It would be a simple matter to create a smart collection which would collate automatically and publish a folder containing, for example, all 3-star pictures of Sarah taken in Florida in 2009.

Apologies if I have totally missed the point.....


----------



## VanMan (Mar 28, 2011)

Jim,

Thanks for the reply. What you describe is how I manage my more specific publish sets. I probably overcomplicated the explanation above though.

To put it in more concrete examples, lets say I have 100 photos in 15 folders (imported and stored by capture-date folders). I have two keyword categories: people and places:
   PEOPLE (100 photos - multiple people in one photo, so totals don't match)
         John  (50 photos)
         Sue   (30 photos)
         Peter (40 photos)
   Places (100 photos)
         USA       (40 photos)
         Europe    (30 photos)
         Australia (30 photos)

For specific albums (USA trip with John and Sue), the collections and smart-collections work well. It's manual based on what you want in there.

But, I want to export all these photos to a "flat structure" with minimal ongoing effort. Export by folder (and hence by date) is one solution, especially with the "tree" exports. But exporting it to folders representing the above keyword structure would be much nicer.

As you mention:
(1) I can do this by creating 6 (one per keyword) collections or smart collections and exporting those.
==> In this simple case, it's the way to go. But once you have 1000s of photos spanning many people and many places (and even a couple more keyword categories), it becomes a full-time job to create/maintain a smart-collection per keyword, especially as I am starting new-ish and adding keywords as I import photos.

(2) it would produce duplicate files where for example 1 person is in 2 locations or 2 people are in 1 folder.
==> This is only reduced-quality jpgs for output (small size, throw-away) for applications that CANNOT read/sort/filter by IPTC/EXIF (iPhone/iPad/iTunes, small PHP gallery, etc). Small price to pay to have an organisational structure that makes finding photos easier.

I must also add that I would only do folders by keyword, meaning the above example results in 6 folders. Doing folders for any/all combinations of keywords just would not make sense, as it would be too much.

Basically, I see what you're eplaining, and I agree it will work. But for large sets it becomes unweildy, especially if you start fresh. Having that build up through years of imports may be OK. But right now, adding the keywords seems daunting enough, not to say adding smart collections for every keyword as well..



Regards,

Van


----------



## Mark Sirota (Mar 28, 2011)

VanMan said:


> But, I want to export all these photos to a "flat structure" with minimal ongoing effort. Export by folder (and hence by date) is one solution, especially with the "tree" exports. But exporting it to folders representing the above keyword structure would be much nicer.


 
Van, can you explain _why_ you want to export these?  That would help us design a solution.


----------



## VanMan (Mar 29, 2011)

Mark,

By "export all photos" I mean all 3-star flagged-for-display photos in the library. Not literally ALL photos, just a good chunk of usable "this is my life" shots. But at the same time, not the 100 top-quality print-on-A3 set.

Simply because I want my photos on my iPad/iPhone in some logical usable structure. And since the iPad/iPhone has no searching/filtering on IPTC/keywords, the only way to get structure is to "pre-cook" it into the folders before syncing with iTunes. I don't just want a folder called "2010" with 1590 images in it. (PS: this using the standard "Photos" app, not 3rd party).

This way, I can show my parents photos of their lovely son and his wife (go to PEOPLE-ME folder/album). And friends our trip to Cancun (go to PLACES-CANCUN folder/album). Granted, it's crude and does not allow for combinations of keywords (or time-line for example multiple visits to Cancun), and duplication of files (low-res throw-away output files). But it's a damn sight better than one album with everything in.

I know I may be a bit anal about this, but as we have spent MANY hours properly keywording the files, it would make sense to use that for some organizational purpose. I know I can achieve all this with collections and smart collections. But that means creating a collection/smart collection for just about every keyword (duplicate work to create, maintain and control when new keywords are added), and that just does not seem all that efficient to me. Also, remember this is the "dump all photos" scenario, not the specific "themed" collections (which I maintain properly).

Maybe the question is: As I am new to Lightroom, is there a better way to do what I am trying? A keyword-aware iPad/iPhone picture app? Easy way to make collections from keywords?

I found another non-lightroom solution, but it's a bit of a work-around. I can export files with names including the keywords (coma-delimited in file name). And then have a small bash script that does a find by keyword name and copies it to specific directories. Not ideal, but works.

Regards.

Van


----------



## erro (Mar 29, 2011)

What if you set up multiple publich services to the local hard drive?

- Create a publish smart collection where "keywords contains Van and Van's wife" and publish that to a folder called "Me and the wife"
- Create a publish smart collection where "keywords contains Cancun" and publish that to a folder called "Cancun"
- Create a publish smart collection where "keywords contains .....", and so on

That's one folder per "event" but maybe usable? Also, you might get the same photos published in several folders (photos of you and the wife in Cancun will en up in both "Me and the wife" and "Cancun") but that's how it should be I guess?


----------



## VanMan (Mar 30, 2011)

Guys,

I appreciate the replies, but I just don't think you are getting what I am trying to do... If I literally had only the 3 sets I used for explanation in this thread, then obviously the solution described above would be a absolute no-brainer. But I am talking about 1000's of fotos, spanning 100s of locations and 100s of people and 100s of events and 100s of "subjects".

My main gripe is that we already HAVE KEYWORDS. I want to use them for some organisation (on export/publish) for a general export (1 BIG collection) of a mass of photos to sources that is unable to filter/sort by keyword/IPTC (iPad, iPhone, static web-page, CD for family, etc). Pre-cooking the keyword structure into the folders used for the export is the only way I can think of doing it.

What I am trying to achieve would be analogues, but exactly the oposite, to keywords. We can have multiple keywords per file. I want to produce a copy of the file per keyword. Not per folder (irrelevant storage location). I know I CAN use use smart collections (and it will work), but I would probably end up with 400-odd. Which would be a pain to create. Which would be a pain to maintain (add new ones as new people/places are keyworded).

Try to think beyond what you have in place in your catalogues right now, and think how you can use it more generically. As an example, say you have properly keyworded photos of 500 different people in your catalogue, and you are suddenly awarded the "Super Top Photographer of the Century" honors. Now suddenly, all 500 people want a copy of just the photos they appear in. What would you do? Create 500 smart collections, one for each person? Or do one export all your photos tagged with at least one person, and then somehow break it up per person (using a search or script or tool)? The last scenario is what I am after: one export with results by keyword.

Other than that, I really have run out of ideas how to further explain it, or to explain why I need it. All I can really say to explain is that I would like to "export/publish photos to folders, where folder names are based on keywords".

Helps?

Van


----------



## johnbeardy (Mar 30, 2011)

LR is designed for slicing and dicing '1000's of fotos, spanning 100s of locations and 100s of people and 100s of events and 100s of "subjects" ' . If you want to have such facility outside LR, then you are going to need some 3rd party solution because I don't think any of the existing LR export plug-ins would do the job for you. Some will  split an export by original folder or even by collection, but not by  keyword - which would also involve lots of physical duplication of the  exported files. It could be done, but I don't think anyone has thought  it worthwhile. Why not export them to a service like SmugMug and then rely on its searching keywords? 

John


----------



## Mark Sirota (Mar 30, 2011)

I think the most efficient solution is a custom post-process action, which I'd probably write as a shell script.  You'd export everything using this export action, which would read the keywords and duplicate the files (probably using hard links on a Mac, is there an equivalent on Windows?) into keyword-based folder hierarchies.

I think this is the winning approach because you only export each file once, no matter how many keywords it has -- saves a lot of time -- and it uses hard links to duplicate the files, which saves disk space.

On a Mac, this could also be done using a Publish collection too -- you'd run the post-processing script as a Folder Action.  I don't think there's an equivalent to Folder Actions in Windows, is there?

I suppose a plug-in could probably be written to do this too, though that's outside my area of expertise.


----------



## VanMan (Mar 31, 2011)

John,

I know Lightroom is perfect for the slicing and dicing.      Unfortunately, many other tools for the "usage" of photos outside of LR is not (for example the iPad/iPhone's standard photo browser). I can (and do) use SmugMug, but that would be a different usage than what I am trying to achieve.

The goal of the forum thread was to (ideally) find a LR export/publish plug-in, or (2nd place) find an external tool. I am sure it can be done by some plug-in coding, but I have not looked into this. I am new to Lightroom, so it is on the cards. But just thought someone else may have done something similar already.


Mark,

Thanks for the info. This is basically the route I have gone (for now).

Previously I had a PHP script to extract keywords and copy files based on that, but it was a bit painful. It was powerful though, as the PHP script also populated a small MySQL DB with file names and keywords, so I can use this for a small dynamic PHP gallery that allows for searching by keywords and combinations.

I recently (1 week ago) started with a Mac, and I am loving the shell scripting. Exactly as you say, I have one collection to export everything of interest. The key is writing the keywords to the file name, as it's much simpler to simply parse the file name than to extract the keywords (for now). Using that, I can duplicate the files as needed.

I will look into hard links (thanks for the tip), but I read somewhere that iTunes don't like links for syncing (not tested it myself). Yes, later versions of Windows (Vista & 7) has links built in. For older versions (XP) there is a small binary to allow creation of links. But these are lower small, res files, and they are "disposable" (no need to back-up), so the result is not too much wasted space in today's 3TB HDD world.

I will also look into folder actions. That would be great to trigger this shell script automatically somehow (on changes, on schedule). I don't think windows have this built in, but I am sure there will be a small program to achieve something similar.

Lastly, as mentioned for John above, i would like to look into possibility of a LR plug-in. But that will have to come later...

Thx.

Van


----------



## jhudson (Oct 22, 2011)

*Export JPGs into folder hierarchy based on keywords*

I’m looking for a way to export JPGS into a folder hierarchy based on keywords…

Catalog:
Weddings\2011-10-13-Smith\LRCAT


 Source Images:
Weddings\2011-10-13-Smith\RAW


Target:
Weddings\2011-10-13-Smith\JPG-Med\Bride_Preparations
Weddings\2011-10-13-Smith\JPG-Med\Groom_Preparations
Weddings\2011-10-13-Smith\JPG-Med\Details
Weddings\2011-10-13-Smith\JPG-Med\Highlights
Weddings\2011-10-13-Smith\JPG-Med\Ceremony

Option 1:
  Do an export for each keyword... PITA!

Option 2:
  Export all to JPG-Med
  Use Bridge, show keyword filter pane - shows all keywords in a directory... drag and drop to new folder hierarchy using the keyword filter to select those images.
      Select Highlights and copy
      Select keywords and move
  This is a little easier but still a pain... 

I'm looking for a way to do this in one step.

BTW... Faststone can parse an entire directory and re-size it into a new destination folder duplicating the folder hierarchy.  I would also like to replace this step using lightroom with whatever we come up with as a solution.


----------



## erro (Oct 22, 2011)

Hard drive publishing service?

Create a service called "Weddings". Inside that, create a publish folder called "2011-10-13-Smith". Inside that, create five smart folders called:
- Bride-preparations
- Groom_preparations
etc.

Create each smart folder with the criteria "keywords" contains "whatever keyword you want".

Now, by right-clicking the publish folder ""2011-10-13-Smith" you can automatically publish all photos underneath it.


----------

