JS CS3 search metadata

Hi All,
I'm sure someone here had posted this great code to parse a files metadata.
function parseMetadata(xmp, tag) {
                        var re = new RegExp('<' + tag + '>(.+)</' + tag + '>');
                        var m = xmp.match(re);
                        if (!m) {
                        re = new RegExp("<[^:]+:" + tag + ">(.+)</[^:]+:" + tag + '>');
                        m = this.xmp.match(re);
                        }                        return (m ? m[1] : '');
                        };var xmp = activeDocument.xmpMetadata.rawData;var myTag = parseMetadata(xmp, "rdf:li");
The problem I'm having is I'm adding "TAG" to the to the keywords field, and as it's sitting in the tree as shown below I am only getting the first instance of the rdf:li tag which is <rdf:li>8</rdf:li>.
<dc:subject>
            <rdf:Bag>
               <rdf:li>TAG</rdf:li>
            </rdf:Bag>
         </dc:subject>
I thought I might be able to use the exec() to return a true or false but i'm just getting undefiend in the script console.
function parseMetadata(xmp, tag) {
                            var re = new RegExp('<rdf:li>TAG</rdf:li>');
                            return re.exec(xmp);}
Any suggestions?
Cheers.

Parsing metadata is not as simple as that function   "rdf:li"  is used all over the place for list items there may be multiple elements in a  list item and more then one list item as well as more then one list. I just open a raw file that has no keywords and extracted the metatdata and looked for rdf:li found data like this:
      <rdf:Description rdf:about=""
            xmlns:dc="http://purl.org/dc/elements/1.1/">
         <dc:creator>
            <rdf:Seq>
               <rdf:li>McAssey</rdf:li>
            </rdf:Seq>
         </dc:creator>
         <dc:format>image/tiff</dc:format>
      </rdf:Description>
        <crs:ToneCurve>
            <rdf:Seq>
               <rdf:li>0, 0</rdf:li>
               <rdf:li>255, 255</rdf:li>
            </rdf:Seq>
         </crs:ToneCurve>
       <exif:ISOSpeedRatings>
            <rdf:Seq>
               <rdf:li>800</rdf:li>
            </rdf:Seq>
         </exif:ISOSpeedRatings>
There are no keywords for this image but you parse function found my name..."McAssey"

Similar Messages

  • How can I filter to find photos NOT pinned to a map? I have 28,000 phots with many mapped and many not. The Search function does not include GPS data. I haven't found  way to search metadata inside or out of Elements.

    How can I filter to find photos NOT pinned to a map? I have 28,000 phots with many mapped and many not. The Search function does not include GPS data. I haven't found  way to search metadata inside or out of Elements.

    How can I filter to find photos NOT pinned to a map? I have 28,000 phots with many mapped and many not. The Search function does not include GPS data. I haven't found  way to search metadata inside or out of Elements.

  • Searching metadata?

    I am currently using Bridge as my photo management software. Until recently, it was sufficient in terms of keeping track of my photos, but now we're exploding at the seams and need access from several terminals. However, the most important part of Bridge, for us, was utilizing the metadata tags and being able to search with metadata tags.
    Is there a way to do this in the Creative Cloud currently? Ultimately, my company needs to be able to access all our stock photos from several places and multiple users. Creative Cloud is the best match for being able to take care of all our needs, but we're missing one crucial part.  We could edit descriptions and add the information we're missing, but redudency is something we're trying to avoid.
    Thanks!

    Is this a feature that could be added sometime in the future? I think Creative Cloud is incredible, but I am really wishing searching metadata was possible.

  • Search metadata in Premiere that I create in Prelude

    So I am trying to get the video team more organized here where I work and Prelude seemed like a pretty awesome tool ... at first.  Call me crazy or maybe I am just completely missing this but when I ingest clips in Prelude and add custom metadata how would I search by this metadata in Premiere?  Isn't this the point of taking the time to add metadata? 

    In the upcoming release of Premiere Pro you will be able to search all of the metadata created in Prelude.
    Hope this helps!
    Michael

  • Searching metadata added in a Custom Panel

    Hello,
    I have created a Custom Panel. Only problem is that when I try to do a search through the File Browser, it does not seem to search any of the data I entered into the custom fields.
    Any thoughts?
    thanks!
    -Alicia

    Yes, I can see all the data values. They are under the Advanced > XMP Core Properties. I have the fields of EventName, EventDate, People, BuildingLocation. All the data shows in the advanced tab, and if I export the data. But in the file browser, even if I select "Other Metadata" in the search field, it won't pull up any images in the search results.
    If there was something wrong with how I wrote the custom panel (which is possible since I really don't have experience in that sort of thing) then it would have even showed up in the advanced tab, right?

  • Writing & Searching Metadata

    I've ingested a large batch of h.264's using Prelude (without transcoding) and I've written lots of metadata into the 'Dynamic Media' and 'Script' schemas.
    I'm now using the files in Premiere and I'm not able to search for some keywords that I know have been assigned.
    I'm also unable to write any metadata at all to P2, .MXF files in Prelude.
    I was able to write metadata after I'd tried transcoding a couple of MXF's but I'd rather not have to do that.
    Any ideas?
    Thanks,

    Hi Mark,
    Thanks for the response and advice.
    I have tried using the CMD+F function to search which did successfully search the Script schema, although this search method is not realistic as it only produces ONE result at a time.
    I have logged a large amount of media and it would be incredibly inefficient to sift through each clip one at a time as opposed to a bin search which immediately FILTERS the results so I see everything that's relevant and nothing that isn't.
    The good news I guess is that the Adobe search engine IS functional in searching the script schema but somehow not from the main search field.
    BTW, I did speak to Ankit Singh from Adobe Support who was trying to replicate the problem but I've not heard back from him ((Case #0186059787)
    Thanks,

  • Search metadata by default in Bridge CS5

    I have metadata embedded into my images in a custom xmp namespace that I've defined. Unfortunately, Bridge does not search the metadata by default when I perform a search.
    Instead, I have to open up the find window and explicitly tell it to include all metadata fields in its search in order for it to work the way I want it to.
    Is there a way to make this the default behavior so that anytime I search using the search bar in the top right corner, it looks at the metadata by default?

    You'll get the best result by asking in the Bridge forum:
    http://forums.adobe.com/community/bridge/general?view=discussions

  • Problems Searching metadata in a Final Cut Project Uploaded to FCS

    We had an intern go through some footage that was on our FCS and load it into a Final Cut Pro project. He then went through and cut up the footage, made it an Independent Clip in Final Cut, and then Renamed the clip. He created multiple clips in Final Cut which all link back to the big master clip which is in Final Cut Server.
    I then just uploaded the Final Cut Project which then created elements for all of the independent clips that were made in Final Cut. Upon closer inspection of the Final Cut Project in FCS, I noticed that in the elements of that project, it created all of the clips that we made independent. Great....almost. Two problems arose. All of the proxy files for those elements all have the same thumbnail based on the master clip, but do have the In/Out points when looking at the proxy file. Can you get the proxy file just to encode the In/Out points and make appropriate thumbnails?
    Problem 2:
    With these elements, when I perform a search with the exact filename of the element in the Final Cut project, it will only show me the Final Cut project. I have to open up that Final Cut project and then look into the Elements Folder of that project. Is there a way to search elements of a Final Cut project where the elements are reference files or metadata of a master clip within Final Cut Server?
    If this doesn't make sense, I'll try and re-explain.

    Yes, I did, but it doesn't show the element only the project and the master clip. In order to actually find it, I have to double-click the found Final Cut Project and then look into the elements tab. I'm trying now to figure out a way to make a custom lookup in the advanced search parameters that would allow me to only search Elements of a Final Cut Pro Project.

  • Adding more search metadata

    How do you add more search data fields on the main page ie Producer search fields ability ? I have created all the Look up tables and gone into the permissions section and double clicked to find the search fields but for the life of me I can't seem to add or remove certain fields ... yes I have read the manual and that was more bland then chicken soup !
    Cheers

    If I understand your question correctly, there are two Metadata groups called "Production Filter" and "Asset Filter". You can add as many metadata fields to these groups as you wish. Add them, then log out of your client, and log back in. The fields you added should appear in your advanced search options.

  • Adobe CS3 Bridge - Metadata Problem

    Hello,
    Alot of my images (JPGs) seem to be losing their metadata, for example, if I keyword a bunch of pictures in bridge and save them. I go back the next day, and they are missing? Also when uploading to a website, if I put in copyright like this:
    © Copright Name 2008
    it almost always appears like this when on site:
    Á© Copright Name 2008
    Does anyone have any idea how, and why this is happening, and if there is a way to resolve this incredibly annoying problem.
    If it's any relevance, I am seperating keywords with commas.

    It should be possible to batch remove that using a metadata template where you set that particular field to be empty and then append that template to all your files (and of course, test on some random pics before doing something like this on all your images)

  • Any Recommendation for storing and searching metadata

    Hi all,
    We upload images to the DB and extract the DICOM, IPTC, XMP and EXIF fields in the DB as xmltypes. This works good.
    Now I am wondering what the recommended way is to make these fields searchabe by the user. I have tried to create an index over those fields, which works ok, but updating them when images are uploaded or removed takes a long time (with jobs).
    Also we need to write those fields back to the image. I read the reference and saw that the example suggest to write a new XML file and then write this back to the image. I only saw the example with XMP, but I guess I can do that with IPTC too, or? If so any examples? Our application allows the user to edit and add new keywords and those fields need to be stored back to the image.
    TIA for any answers.

    OK, we only support replacing Metadata in XMP format.
    Also, we do not support replacing metadata with DICOM medical images.
    Do you have a write up of your application? If we onderstood what you were trying to do, we would be in a better position to make recommendations, like what kind of indexing to use. If possible, you could send it to me at [email protected]
    If you have interMedia requirements, send them to [email protected]
    Larry

  • [AS CS3] Search first occurence then next search item

    Hi!
    I have a 1000+ page book. I need to change several (2000+) names to character style but only first occurence of that name and then search first occurence of next name. Names are on a text file which i read to AS but if i use
    set myFoundItems to change text
    it searches all occurences of find text and changes to character style.
    What i need is a script that searches first occurence of name "AAA", changes that to character style "Whatever" and then proceeds to search name "BBB" and changes that too. Only first occurences of search.
    It would be wery handy if the second search (BBB) would start right after the "AAA" and not from the beginning of teh story.
    Any ideas?
    Thanks

    On 19/2/08 9:39 PM, "Jukka Lauhalahti" <[email protected]> wrote:<br /><br />> if one could just exit the seach/replace loop after found one item and search<br />> next item in the list from that position would speed the script...<br /><br />It would, but you can't...<br /><br /><br />-- <br />Shane Stanley <[email protected]>

  • [CS3] Search Index Markers

    Is there a way to search for index markers and then get the content from it to put it in a new created anchored inline textframe? I wan't to create side-heading like in Framemaker.

    Hi Peter,
    what a nice script!
    I have took the liberty of doing some modifications to take use of the conditional text feature in
    InDesign CS4. So one can make the previous index entries visible or not.
    Here it goes with the (new) function 'conditional_note()' instead of 'side_note()':
    // index2text.jsx
    // based on a script of Peter Kahrel, modified to take use of InDesign CS4 conditional text
    Object.prototype.get = function( )
       try {
          var myObject = this.item( arguments[0].name );
          myObject.name;
       catch (e) {
          var myObject = this.add( arguments[0] );
       return myObject;
    var myConditionSet = app.activeDocument.conditions.get( {name:'Index',  indicatorMethod:ConditionIndicatorMethod.USE_HIGHLIGHT} )
    index2text (app.activeDocument);
    //delete_index (app.activeDocument);
    myConditionSet.visible = false;
    function index2text (doc)
       var tops = doc.indexes[0].allTopics;
       for (var i = 0; i < tops.length; i++)
          for (var j = tops[i].pageReferences.length-1; j > -1; j--)
             var ip = tops[i].pageReferences[j].sourceText;
             var p_ref = topic_path (tops[i], tops[i].name);
             conditional_note (ip, p_ref)
    // create topic string. Subtopics are separated by '#'
    function topic_path (top, str)
       if (top.parent.constructor.name == 'Index')
          return str;
       else
          return topic_path (top.parent, top.parent.name + '#' + str)
    function delete_index (doc)
       // delete page references and topics
       doc.indexes[0].topics.everyItem().pageReferences.everyItem().remove();
       doc.indexes[0].topics.everyItem().remove();
    function conditional_note (ins_point, s)
       ins_point.appliedConditions = myConditionSet;
       ins_point.contents = s;
    function side_note (ins_point, s)
       var sidebar = ins_point.textFrames.add ();
       sidebar.geometricBounds = [0,0,10,70];
       sidebar.appliedObjectStyle = app.activeDocument.objectStyles.get( { name:'sidebar' } );
       sidebar.itemLayer = app.activeDocument.layers.get( { name:'sidebar' } );
       sidebar.contents = s;
       sidebar.fit (FitOptions.frameToContent);
    Thanks
    Martin Fischer

  • Help searching metadata in finder

    Hello,
    I have a long list of movie files in a folder. They have pretty random names, but it is not something I can change. What I can do is add a specific title to 'spotlight comments' and then try and search for that specific title in spotlight when need be. I thought this would work, but I get zero results back in my serach query. Any ideas why?
    thanks
    dan

    It sounds like the Desktop folder's "bundle bit" may have become set, making it behave like a "package" instead of a folder.
    You can try to fix it with Terminal, but the needed SetFile command normally requires a prior installation of Xcode Tools. Instead, I would try the following:
    Download [Path Finder|http://www.cocoatech.com], which has a 30-day free trial period. Navigate to the Desktop folder from within Path Finder, select it, then File Menu>Get Info. If the "Bundle bit" box is checked, uncheck it:

  • PhotoShop CS3 Searches Internet, Why?

    When I have copied something and go to paste the image in PhotoShop CS3, something causes my system to open a connection to the Internet for several seconds (maybe 15) before I can paste.  I have checked my system for all sorts of virus issues, fearing key recording software, but I don't have anything like that.  I've been told by our IT person (who checked my system) that there is something Adobe is doing.  Is this true?  Why does PhotoShop need to make this connection?
    Thanks for your thoughts.

    But deleting Help files is no good if the user wants to refer to Photoshop Help!
    Ron,
    Several things associated with CS3 use the Internet: Updates and Version Cue have been mentioned and there is also the Bonjour Service. But these are not associated with Copy/Paste. Maybe the item has been copied from a web page and has an an embedded link.
    Try disabling Bonjour, Updates and Version Cue in turn to see if it goes away.

Maybe you are looking for

  • How to Retrieve Messages from Function Module 'CM_F_MESSAGE'

    I have a custom program that first calls function module CM_F_INITIALIZE to make sure that pop-ups are not displayed on screen. This program then performs a subroutine that also calls function CM_F_MESSAGE. How do I retrieve the messages so I can out

  • Convert Illustrator script from cs3 to CS5

    Hi Everyone, I'm new to illustrator scripting I did some simple InDesign script before but this the first time I am ask to create script for Illustrator. We have an old script that will create a report for the properties (e.i.: fonts, linkedImages, s

  • Can run adobe 32 bit in IE 32 bit, but crashes on firefox. Windows 7

    The computer is a 64 bit. IE 64 works with adobe beta 64 maybe, but firefox seems to have troubles both with adobe 32 bit and adobe 64 bit. Adobe help is worthless due to confusing and incomplete info.

  • Dreamweaver CS3 crashing on Design view

    I updated my Flash player yesterday and I've turned of FontExplorer in hopes<br />it might be a bad font, but every time I open Dreamweaver now and open a<br />file, it is crashing.<br /><br /><?xml version="1.0" encoding="UTF-8"?><br /><!DOCTYPE Ado

  • N85 - interesting problem watching videos

    Hi Guys, Daft question - but when I'm watching videos (either mp4's or self-shot) the screen goes dark like when you have the keypad locked (bit like power saving mode) - except it happens when the keypad is unlocked or locked, watching landscape or