8 Replies Latest reply on Nov 8, 2013 9:23 PM by giaponese

    Use image metadata for "put in subfolder" export option?

    giaponese

      Hello everyone,

      I was wondering whether it's possible to put metadata (or presets or even a regex) in the blank field that appears in the export panel when "put in subfolder" is checked.

      I found this wonderful plugin

      http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=3029 022

      that almost does the job, except for the fact that it doesn't accept the current folder's subfolder as an option: I still have to set the fullpath to the start location (called "root" in the plugin), which kind of limit the advantage of having the destination folder created programmatically.

      Does anyone know a way to have the images exported in the subfolder while being able to have that folder name created programmatically (using the image metadata or anything else, for that matter)?

      Many thanks.

        • 1. Re: Use image metadata for "put in subfolder" export option?
          areohbee Level 5

          I feel like I could help, if I understood the problem better.

           

          giaponese wrote:

           

          I still have to set the fullpath to the start location (called "root" in the plugin), which kind of limit the advantage of having the destination folder created programmatically.

          (I'm not seeing any "root" in my copy of the plugin).

           

          Where are you setting this fullpath?

           

          Perhaps screenshots would help or something..

           

          PS - You can name folders/files any way you want with Exportant (see 'Custom Naming' section), if you're willing to tweak a little lua.

           

          Rob

          • 2. Re: Use image metadata for "put in subfolder" export option?
            giaponese Level 1

            Thank you Rob for your consideration, and aplogies for the mistake: indeed, there's not "root" in the plugin...

             

            Here is how I'd like the LR interface to look

            lr_export.png

             

            As you can see in the screenshot, I'd like to be able to set a token (that's going to be replaced automatically during export) instead of plain text.

             

            Now, moving to the "Meta Export" plugin:

            meta_export.png

             

            (Note: here I alsoadded the filetype, but just for the sake of adding tokens..)

            I'd like to be able to choose wether to set a destination (using the browse button) or just put the images in a subfolder, like in the LR export interface.

            Now in the plugin I have only one option, but my idea would be to have in the "Destination" dialog at least two options (put in LR jargon):

            1 -> Specific folder (as it is right now)

            2 -> Same folder as original photo + Put in subfolder

             

            I hope this clarifies my intent, but please let me know should you find this information incomplete to undertand the issue.

            Many thanks!

             

            PS - You can name folders/files any way you want with Exportant (see 'Custom Naming' section), if you're willing to tweak a little lua. I'll give it a try, thank you!

            • 3. Re: Use image metadata for "put in subfolder" export option?
              areohbee Level 5

              giaponese wrote:

               

              You can name folders/files any way you want with Exportant (see 'Custom Naming' section), if you're willing to tweak a little lua. I'll give it a try, thank you!

              Start with 'Source Folder Name as Export Folder Name' preset (plugin-manager/preset-manager preset, not export preset), which probably should have been named 'Export Folder Name same as Source Folder Name'.

               

              Let me know if I can help, I dunno your level of programming experience..

               

              Rob

              • 4. Re: Use image metadata for "put in subfolder" export option?
                giaponese Level 1

                Thank you, just playing with it right now

                Any chance to get the folder name of the parent of that one?

                Ex: I'm in "Summer" folder and the folder structure is

                Pictures

                     2013

                          Summer

                 

                And exporting to "Summer 2013"?

                • 5. Re: Use image metadata for "put in subfolder" export option?
                  areohbee Level 5

                  Duplicate 'Source Folder Name as Export Folder Name' preset and name it 'My Folder Switcheroo' or whatever, then

                   

                  change:

                   

                  local srcDir = LrPathUtils.parent( srcPath )

                  local dirName = LrPathUtils.leafName( srcDir )

                  local newDir = LrPathUtils.standardizePath( LrPathUtils.child( dir, dirName ) )

                   

                  to:

                   

                  local srcParentDir = LrPathUtils.parent( srcPath )

                  local srcParentDirName = LrPathUtils.leafName( srcParentDir )

                  local srcGrandParentDir = LrPathUtils.parent( srcParentDir )

                  local srcGrandParentDirName = LrPathUtils.leafName( srcGrandParentDir )

                  local newDir = LrPathUtils.standardizePath( LrPathUtils.child( dir, srcParentDirName .. " " .. srcGrandParentDirName ) ) -- standardizing path is not necessary in this case, but doesn't hurt either.

                   

                  That's it (watch for typos...), once you've inserted 'Custom Naming' filter, and enabled 'Custom Folder Naming', I mean.

                   

                  Rob

                  • 6. Re: Use image metadata for "put in subfolder" export option?
                    giaponese Level 1

                    Awesome! You did it! Thanks!

                    • 7. Re: Use image metadata for "put in subfolder" export option?
                      areohbee Level 5

                      You bet .

                       

                      Note: consider choosing 'Move to trash' or 'Permanently delete' (in 'Custom Naming' section) so you don't have extraneous copies to deal with after exporting.

                      • 8. Re: Use image metadata for "put in subfolder" export option?
                        giaponese Level 1

                        I will, many thanks again!