Global keyword cleanup and management

doublemeatdoublemeat Registered Users Posts: 24 Big grins
Before writing these tips, I did do a forum search. I've seen parts mentioned as replies, but not the whole thing, and not as it's own thread. So, I hope this helps my fellow smugmugspeople.

The purpose of this guide is to clean up all of your tags at once, and shows you how to "normalize" your tag delimiters, make everything lower-case, etc.

    [*]First, you need to retrieve all of your photos at once:
    1. Create a new gallery.
    2. Make it "smart".
      1. Select "Include", "My Photos", "Date", "Uploaded".
      2. For date range, enter: 1/1/1000 to 12/31/2999.
      3. Save.
    3. View the gallery.

    [*]Now you can manage the keywords to all your photos at once. In your new gallery view, under the "Tools" button, choose "Caption / Keyword".
    1. SmugMug has a pretty quirky keyword system. Compounding the problem is that different client programs delimit IPTC keywords in wildly different ways (which SmugMug reads to initially populate keywords). So some general global cleanup is almost certainly in order. But first, please note:
      • The "Preview" button is actually sadly misnamed. It should be labeled "Execute the action for the first occurrence in each photos keyword block". After the first click of, say, a "Replace" operation, then the first replacement will no longer match, and so what was the second match now becomes the first, and so on. Why it works that way is God's own private mystery. (I suspect it's just a simple logical error in a few lines of search and replace code--a common logical error--that they haven't bothered to fix.)
      • In other words, for each change itemized below, you must press "Preview" more than once for each line item. In fact, for most of the changes (esp. the steps for cleaning up the delimiters), you must press the "Preview" button once as many times as the maximum number of keywords you have in any one photo. (If you have more than 10 or 15 keywords for one photo, thats probably "too many" anyway. Regardless, just make sure you match or exceed the maximum number of keywords you have for any one photo. I usually press the "Preview" button 20 times just to be safe. It doesn't hurt to press "Preview" too many times.)
      • The code attached to the "Preview" button is--mercifully--executed locally in Javascript. There is no server round-trip. On a fast computer, it is usually fairly instant even on a long list of photos, so pressing the "Preview" button 20 times shouldn't take more than 20 seconds.
      • The order of execution is very important. If you veer out of order, depending on where, you'll either slow down the process, create redundant--or worse, extra--work for yourself, or easily screw up your keywords altogether.
      • Always visually inspect your keywords after changes--however quickly--before saving them. Or you could be very, very sorry!
      • You, not I, are responsible for any screwups! (Visually inspect before saving!)
    2. Now that you know that, let's clean up your tags.
      1. Prep:
        1. For the "Quick entry" selection, choose "Replace".
        2. The last two dropdowns should default to "all" and "keywords", which is what you want.
      2. Let's do this thing:
        1. Remove quotation marks from tags, which interfere with many other tag operations:
          • Important: Do not use the "Remove" tag function to remove double quotes. Sounds perfectly intuitive, but trust me it will ruin your day. It winds up concatenating some keywords together (even with what were once perfectly valid delimiters in between them).
          1. Remove double quotes:
            1. Replace this <doublequote> with <empty>.
            2. Replace this <doublequote><doublequote> with <empty>
          2. Remove single quotes using the same method as for double.
        2. Fix delimiters so that they are all uniformly <comma><space>.
          • The space is important so that the words properly wrap in the little text boxes, for your own legibility.
          1. Replace this <comma> (",") with this <semicolon> (";")
            • Note that there are no spaces in either entry.
            • Do not include any quotation marks, those are used for clarity.
            • Note: semicolons are valid SmugMug delimiters themselves, but this step is necessary:
              1. To eventually work proper spacing in with commas, and
              2. To convert mixed commas and semicolons to all commas.
          2. Replace this <semicolon> (";") with this <comma><space> (", ")
            • Note the space after the comma!
            • Do not include any quotation marks, those are used for clarity.
          3. Replace this <comma><space><space> (", ") with this <comma><space> (", ")
            • Note there are two spaces after the first comma, and one space after the second comma.
            • Do not include any quotation marks, those are used for clarity.
            • You may need to press "Preview" many more times than normal. (Because you may have multiple delimiters in each keyword field with more than two spaces each. Try blindly doing 20 or 30 times just to be on the safe side.)
          4. Replace this <comma><space><comma><space> (", , ") with this <comma><space> (", ")
            • There are two commas in the first field, one comma in the second field.
            • There is one space after each comma for both fields.
        3. Replace this <space><space> (" ") with this <space> (" ")
          • Once again may need to press "Preview" more times than normal. (Because you may have multiple instances of three spaces or more in each photo keyword field. Try blindly doing 20 times or so just to be on the safe side.)
          You will now have a nice, clean, all "comma-space" delimited, non-quoted list of tags with no double delimiters or double spaces.
        4. Change any capital letters to lower-case.
          • Capital letters in SmugMug keywords is problematic, because:
            • The "replace this with this" management feature is--bafflingly--case-sensitive. This makes everyday keyword management "difficult", at best.
            • SmugMug displays keywords in all lower-case anyway.
          • Note: For some crazy reason you cannot just do a simple replace one character at a time, from capitals A-Z, to lower-case a-z. It just, bafflingly, doesn't work. And that would be too easy! So, you have to jump through some hoops.
          • Steps:
            1. Look for capital letters in the keywords on the first visible portion of the page.
            2. Do a replace "this" ... "with this" ... for each individual word (rather than whole keyword phrase) you find with a capital letter in it.
            3. Once you clear the first visible page of capitals, scroll down. And repeat...until the end.
            This will seem really tedious at first, but you should find that, like debugging code, the process accelerates and it's over mercifully quickly. Doing it one word at a time rather than whole phrases should (but not necessarily) speed things up, especially if you often have more than two keyword phrases with the same individual words in them (e.g. "Mt This", "Mt That", Mt TheOtherThing", and "Mr That").
        5. For consistency with other tagging systems, get rid of periods in abbreviations.
          • DO NOT try to simply replace "." with [blank], and especially do not do a "Replace" function on ".". Although that would make perfect sense, for some reason this seems to remove your tag delimiters (sigh). The "Replace" function actually merges all your keywords together. (I suppose for the use case [??] where that would make perfect sense!)
          • Instead, follow these steps:
            1. Follow the same general procedure as the de-capitalization process, in terms of visually scanning for words with a periods in them.
            2. Try these low-hanging fruit: "mt.", "pt.", "st.", etc.

      You should now have a fairly well delimited, cleaned, and cased set of keywords.

      [*]Save the keywords now! This will dump you back into gallery view.
      [*]Now go back to the gallery "Caption / Keyword" view again.
      [*]You should now be able to scroll through and do targeted one-off manual clean-ups, more easily than before. This might not be the best way to actually do keyword content management, just due to the sheer volume of photos and keywords, and the logistics of regular saving and resulting scrolling...but to each his/her own!

      [*]


      I should point out that it is fun to make jokes of the tag management system at smugmug's expense. But I still find it marginally better than even the tagging systems of Flickr or Picasaweb, both of which are arguably much more "web 2.0"-ish. I know there are many other features on smugmug's plate, with a limited development crew--and as long as the tagging feature covers most of the important use-cases, they are probably fine with it as-is. (Can't say I'd make different choices.) But man, just think what a little more polish would do! Nobody would need to write a guide like this, that's for sure!

      Happy tagging.
      -Jim

      Comments

      • doublemeatdoublemeat Registered Users Posts: 24 Big grins
        edited July 2, 2010
        If only there were a Firefox or Chrome add-in that would do a REAL "search and replace" on all text boxes on a web page! That could completely replace SmugMug's keyword management, without any hack-ey-ish tricks. (After all, that's all SmugMug's Javascript functions are doing, on the client-side and without a server round-trip, albeit only on the specified caption and/or keyword columns. But I suppose that a plugin could have some arbitrary user-specified field smarts built into it too...) I've never written a browser plugin/extention/add-on, but this seems like something even I[/] could handle! Talk about simple...at least without the "smart field" functionality... (I've already searched high and low for one, to no avail.)
      • juanherediajuanheredia Registered Users Posts: 345 Major grins
        edited April 14, 2014
        Great tip. Very useful. Thanks for sharing.
      • Rip WilliamsRip Williams Registered Users Posts: 5 Beginner grinner
        edited January 30, 2015
        Quick note: This only works for the first 1000 images in your site (the maximum returned by a smart gallery.) I split mine up into 2 year chunks, which worked great. Thanks!
      Sign In or Register to comment.