Rename Keywords API

Mark.MichaelisMark.Michaelis Registered Users Posts: 1 Beginner grinner
Based on the discussion here, it appears that slash categorization pattern from Windows (Live) Photo Gallery is not supported. Therefore, a keyword/tag of "Peoples\Michaelis\Mark" ends up being uploaded as "peoplemichaelismark" which is most unfortunate.

I am looking for an API to improve this. Is there an API for me to rename keywords. I would like to rename "peoplemichaelismark" to "people michaelis mark" for example? I would hard code the from/to list. I am not looking to do this on my local drive, but rather with the photos I have uploaded to smugmug only. My local ones would still use the slash format that Windows (Live) Photo Gallery supports.

Thanks,
Mark

Comments

  • darryldarryl Registered Users Posts: 997 Major grins
    edited August 4, 2008
    Eek. Have you uploaded all of your photos already, and SmugMug concatenated all the hierarchical keywords into single keywords?

    SmugMug does let you both read and write keywords via the smugmug.images.getInfo and smugmug.images.changeSettings respectively, but I think the real problem will be figuring out how to split these concatenated keywords back into their separate components.

    I guess since you have your hierarchy already, you can walk through it for each keyword:

    peoplemichaelismark

    Here's some Perl pseudocode:
    @known = qw(academic computer code cocoa css html php game hardware mac pc paypal software) ;
    
    for each photo {
    
       get the $currentkeyword from getInfo ;
       foreach $checkthis(@known) {
            if ($currentkeyword =~ /$checkthis/) {
                  push (@newkeywords, $checkthis)
            }
        }
    }
    

    This assumes you don't have any cases like... somethingphpcode because that would match 'pc'.
Sign In or Register to comment.