3rd party code software to help with search

voicelitvoicelit Registered Users Posts: 343 Major grins
edited March 30, 2008 in SmugMug Support
Since file names are not getting added to keywords when uploaded at the moment, any ideas on importing some code from outside SmugMug or some kind of service or software to take over the searching duties until SmugMug gets the "bug " fixed.

Marty ( photofur, voicelit, http://photofur.smugmug.com/)

Comments

  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited March 9, 2008
    voicelit wrote:
    Since file names are not getting added to keywords when uploaded at the moment, any ideas on importing some code from outside SmugMug or some kind of service or software to take over the searching duties until SmugMug gets the "bug " fixed.

    Marty ( photofur, voicelit, http://photofur.smugmug.com/)
    No, I'm sorry there isn't.
  • darryldarryl Registered Users Posts: 997 Major grins
    edited March 10, 2008
    Marty:

    You could probably write an script in Perl/Python/etc that could take a file and edit the EXIF keywords to include the filename.

    If you are not familiar with scripting, I might be interested in hacking together a utility for a small fee, provided I could then freely release the utility to the SmugMug community.

    Also -- what platform would you need this to run on? Windows? Mac? Linux?

    --Darryl
  • darryldarryl Registered Users Posts: 997 Major grins
    edited March 11, 2008
    Oh wait, Andy says this behavior is a bug that they're going to fix.

    Ah well, somebody on Phanfare is asking for a similar tool. So I guess I'll try to hack something together quick so that both sets of users can use them.

    I wonder if this would merit me another Lifetime Pro account here. :-}

    --Darryl
  • voicelitvoicelit Registered Users Posts: 343 Major grins
    edited March 12, 2008
    How much for script ?
    I seem to come so close time after time to finding an app that does what I need . There are IPTC editors out theare that automate the process of bulk adding what I name my photo file to either the IPTC TITLE FIELD or DESCRIPTION. But -for instance- I can get all my namings to get bulk add ed the title field, but SmugMug doesn't read the iptc title fileld like I've just heard PICASSA does . Each time, each app, each work around is blocked by a different element each time - like a rubix cube.
    I don't know what to make of the "bug," "we're fixing it" stuff. In my case it's been a "bug" for months. If you can come up with script for this for a price , why can't someone just come up with it involved in the SmugMug world. There's something strange about this whole thing. No one seems to want to sincerely address this problem of mine.
    Wonder what it is. I know the "community" is devided about liking file names getting auto added to keywords, I know that SmugMug is getting attacked for some dimwitted approach to security - that had to do with people using forms of search to enter private galleries , I've been told a couple of times that this was how smug mug did it in the past and intends to do it again - so it must not be an exotic and unique concept, and , though I don't know how involved that is , you say you can write a script for it - which leaves me wondering why a temporary solution like that isn't offered somewhere in the forum . Something defensive and fragile about the whole social feel around this.
    Oh well, get back to me when you can. I'm gonna be trying to find ou about iptc editors , one : BREEZE BROWSER ... somewhat automates the adding of filenames to the iptc title field or description field but I may not be understanding something about "export."

    Thanks again,

    Marty

    http://photofur.smugmug.com/

    darryl wrote:
    Oh wait, Andy says this behavior is a bug that they're going to fix.

    Ah well, somebody on Phanfare is asking for a similar tool. So I guess I'll try to hack something together quick so that both sets of users can use them.

    I wonder if this would merit me another Lifetime Pro account here. :-}

    --Darryl
  • darryldarryl Registered Users Posts: 997 Major grins
    edited March 17, 2008
    f2k.exe (Perl script to convert filenames to keywords)
    Ok, it took far longer than it should have, which should worry you, but here it is:

    http://www.darryl.com/f2k/
    NAME:
            f2k - Convert filenames to IPTC keywords in JPEG files.
    
    USAGE:
            f2k.exe somekeyword.jpg
    
    RESULTS:
            The tool will work with wildcards (*.jpg, or *.JPEG), and will
            recognize the following characters as keyword separators:
            -_#.^%&+[space]
    
            So, if you were to name your file:
            lets-all_have#fun.at^the%super exciting&amusement+park.jpg
    
            Your file would have the IPTC keywords:
            lets, all, have, fun, at, the, super, exciting, amusement, park
    
            Note too that common leading image prefixes will be ignored if
            they are followed by a non-alphanumeric character:
            DC, DCP, DSC, DSCI, DSCN, EX, IMAG, IM,
            IMG, MVC, P, PICT, PMDD, IMGP, PANA, IMAGE
    
            So, IMG_12345.JPG will have the keyword: 12345
    

    Executable is a "compiled" Perl script. It should work on the command-line as well as drag-and-drop. I HIGHLY RECOMMEND that you run it on copies of your photos, not the originals, as this is hackish Perl code, converted to a Windows executable.

    I've tried to test as much as I could stand, but I'm sure there's a possibility that this could mess things up.

    At any rate, please, give it a try on backups of your photos, and let me know how it goes.
  • darryldarryl Registered Users Posts: 997 Major grins
    edited March 17, 2008
    If, for some reason you've been using your filenames as captions, check out my other hastily hacked utility, f2c: http://www.darryl.com/f2c
  • voicelitvoicelit Registered Users Posts: 343 Major grins
    edited March 18, 2008
    DARRYL, Didn't work
    D,

    Thanks for all the worrk. I couldn't get it to work. Drag and drop whent fine for both hacks, but didn't show up in SmugMug with either keywords or captions?
    For turning filenames into captions here on my computer Pre upload to SmugMug , I found this great app : BreezeBrowser. You put what they call a token in the description field of the IPTC edit ; it ' s like this: @file@ , and ( in mass/bulk ) all thumbs selected come out ready to be instant captions in the SmugMug world. Doesn't do much for KEYWORD; it might but it's hard to tease out any help from it. Have to select some thing with the word "legacy" in it ( forget what) in the preferences to get it to work. Free evaluation. Pretty nice so far.

    Wonder what hung up in your hack.
    Tell me what else you want. Try again ?

    Marty (dotfur.com)


    darryl wrote:
    If, for some reason you've been using your filenames as captions, check out my other hastily hacked utility, f2c: http://www.darryl.com/f2c
  • darryldarryl Registered Users Posts: 997 Major grins
    edited March 19, 2008
    Marty, can you run f2k.exe on a few of your photos and put them in a gallery I can look at? I'd want to be able to download originals to see if my utility was actually putting the keywords in.

    I tested on a bunch of my photos, and both f2k and f2c worked. However, one image did not have its keywords picked up by SmugMug.

    Very odd.

    Thanks!
  • voicelitvoicelit Registered Users Posts: 343 Major grins
    edited March 19, 2008
    PHOTOS with Darryl HACK
    Marty wrote:
    There on there now :
    http://dotfur.smugmug.com/gallery/3119062_m3KVr/1/266886279_TsvSf/Medium

    http://dotfur.smugmug.com/gallery/3119062_m3KVr/1/266886322_qM5v4/Medium

    photos 38 thru 41
    The last one or two may be the caption maker script. Sorry can't do much, oral surgery yesterday,


    Marty (dotfur.com)

    darryl wrote:
    Marty, can you run f2k.exe on a few of your photos and put them in a gallery I can look at? I'd want to be able to download originals to see if my utility was actually putting the keywords in.

    I tested on a bunch of my photos, and both f2k and f2c worked. However, one image did not have its keywords picked up by SmugMug.

    Very odd.

    Thanks!
  • darryldarryl Registered Users Posts: 997 Major grins
    edited March 19, 2008
    I'm an idiot. I should've tested my .exes on machines other than the place I compiled them.

    Making portable Perl scripts is tricky.

    Should have something that works tomorrow.
  • darryldarryl Registered Users Posts: 997 Major grins
    edited March 29, 2008
    Marty:

    I think I got my script working. Please give it a try!

    Here's the workaround. It's kind of a kludge, but you'll need to download two executables:

    http://www.darryl.com/f2k/

    Basically my script, f2k.exe just reads the filename, does a little parsing, and then calls the very excellent exiftool.exe to write the keywords. Exiftool is written by Phil Harvey, and more info about it is available here: http://sno.phy.queensu.ca/~phil/exiftool/

    So, download both f2k.exe and exiftool.exe (both on my site), then drag and drop your JPG files on top of f2k.exe. It should take a file like "joe_mary_beach.jpg" and add the keywords joe, mary, beach to the EXIF keywords. It will also create a backup of the original file, named joe_mary_beach.jpg_original
  • voicelitvoicelit Registered Users Posts: 343 Major grins
    edited March 29, 2008
    so far so good
    Really late here. Quick test. worked fine . Oh, haven't tried it with a batch of photos yet. uploads, becomes keywords on smugmug. Search finds photo.
    Not sure what it does to the photo. I wind up with 2 of same. One cannot be uploaded to smugmug.

    Marty
  • voicelitvoicelit Registered Users Posts: 343 Major grins
    edited March 29, 2008
    problem
    downloaded both to my desktop. put in same folder. Got a couple of photos to work. But now - keeps saying " must be located in same directory" even tried adding .exe to exiftool .
    Is it supposed to do al this in batch, or one photo at a time?
    Marty
  • voicelitvoicelit Registered Users Posts: 343 Major grins
    edited March 29, 2008
    NUTHIN happinin here
    Nah, just tiresome. FIRST : what's a directory ? It just keeps saying " must be located in same directory?" Got em in same folder.. blah... blah...
    Need it to do BATCH anyway. Am trying to work with exiftool Harvey guy. Says it all can be done but won't come down from perl script speak.

    Marty


    voicelit wrote:
    downloaded both to my desktop. put in same folder. Got a couple of photos to work. But now - keeps saying " must be located in same directory" even tried adding .exe to exiftool .
    Is it supposed to do al this in batch, or one photo at a time?
    Marty
  • darryldarryl Registered Users Posts: 997 Major grins
    edited March 30, 2008
    Hiya Marty:

    Yeah, it's supposed to work in batch mode, but apparently I've still got some bugs.

    Yes, exiftool can do it, but not by itself. Exiftool is actually a Perl module, so I tried writing a standalone program that would use Exiftool along with a bit of logic to process batches of photos. The program works if you have Perl installed, but that's kind of a pain.

    I tried to use a Perl packaging program to make a standalone program, the first thing I had you try, but because of the way Exiftool is written, the packaging program doesn't get everything needed.

    That's why I rewrote my script to rely on Phil's standalone exiftool.exe. But apparently there's still some problems. Drat. Will have to try again later doing testing on a "clean" machine.

    BTW, you're only supposed to upload blah_blah.jpg, not blah_blah.jpg_original. The _original file is just a backup of the image.

    --Darryl
Sign In or Register to comment.