Move photos based on keyword?

NimaiNimai Registered Users Posts: 564 Major grins
edited August 5, 2007 in SmugMug Support
I have a bunch of (over 400) photos all nicely keyword'ed in one gallery. Now I need to move all with a certain keyword into their own gallery so that I can password-protect them. Any nifty tools or workflows that wiill help?

Thanks

Comments

  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited August 4, 2007
    Nimai wrote:
    I have a bunch of (over 400) photos all nicely keyword'ed in one gallery. Now I need to move all with a certain keyword into their own gallery so that I can password-protect them. Any nifty tools or workflows that wiill help?

    Thanks
    Hi Nimai, sorry no, I don't have a fast way for you to do this. Wish I had a better answer for you!
  • NimaiNimai Registered Users Posts: 564 Major grins
    edited August 4, 2007
    Thanks- at least the idea is out there now! Maybe in a future version of SmugBrowser or the like.
  • NimaiNimai Registered Users Posts: 564 Major grins
    edited August 5, 2007
    Just to follow up, I did this using a neat tool for FireFox called "JavaScript Shell". It let me open the Bulk Move page and run some JavaScript to set the selectedIndex of just the images that were in an array of image numbers I got using a keyword search. Kinda convoluted, but it guaranteed that I got everything right.
    Here's the script:
    var PicsToMove = [/*put comma separated list of image numbers here*/];
    var AlbumID = 12345; // Put Album ID here
    var r = /[0-9]+/;
    var images = document.images;
    for( i=0; i<images.length; ++i ) {
       var img = images[i];
       var m = r.exec( img.src );
       for( j=0; j<PicsToMove.length; ++j ) {
          if( m == PicsToMove[j] ) {
             var select = img.parentNode.nextSibling.nextSibling.firstChild.nextSibling;
             var options = select.options;
             for( k=0; k<options.length; ++k ) {
                if( options[k].value == AlbumID ) {
                   select.selectedIndex = k;
                   break;
                }
             }
             break;
          }
       }
    }
    
Sign In or Register to comment.