-
1. Re: How append to group metadata "Description"?
Sverk Sep 8, 2013 4:10 AM (in response to Sverk)I spotted a typo:
Should be:
Very often I want to append to the Description for a group of images, and that works nice -- but ONLY if that field is empty in all the selected RECORDS.
-
2. Re: How append to group metadata "Description"?
Philip Cord Sep 8, 2013 4:30 AM (in response to Sverk)You could try creating a temp Template (Tools - Create Metadata Template) with the description data you want to add, save this template. Open a new Bridge window select the documents and then Tools - Append Metadata - select template. With two windows open you can then swap and amend the template to change the data as required.
-
3. Re: How append to group metadata "Description"?
Sverk Sep 8, 2013 7:33 AM (in response to Philip Cord)Philip,
Seems like it could work -- but I can't get it to do any Append Template.
It works only if the field is empty, if there is anything in there before, Append does nothing.
Very strange since the very meaning of Append should be to add to whatever is there before, right?
-
4. Re: How append to group metadata "Description"?
Philip Cord Sep 8, 2013 8:00 AM (in response to Sverk)Yes you are right, just tested it and it didn't work. Looks like Adobe didn't test this!
I suppose the only other way is to use a custom Bridge script.
-
5. Re: How append to group metadata "Description"?
Sverk Sep 8, 2013 8:49 AM (in response to Philip Cord)Thanks for confirming what I found,
Too bad though, since your suggestion would be very muck what I need -- if Append Template worked. Adobe badly needs to fix that !
Although I have a variety of programming experience through the years, I haven't done any Bridge or similar scripting.
I figure it would be very helpful for me to have an example or two of such scripting that I can take off from, if possible some scripts that do things with Bridge metadata.
Are there any?
-
6. Re: How append to group metadata "Description"?
Sverk Sep 8, 2013 8:58 AM (in response to Sverk)Continued:
This is how I wold want it to work, probably:
First I select a bunch of image files.
2. I start the script which launches an input text box or similar, where I type in the text I want to Append.
3. Upon OK, the script should probably go through the selected files, one by one, and
4. read the content of the Description field into a string,
5. add the string to append, and then write it back.
6. repeat for the next selected file, until all done.
Any script that works its way through a series of selected files would be useful to start out from and modify.
-
7. Re: How append to group metadata "Description"?
Philip Cord Sep 8, 2013 9:40 AM (in response to Sverk)I have been looking at a number of scripts in the Bridge scripting forum.
http://forums.adobe.com/community/bridge/bridge_scripting?view=discussions
Also at numerous scripts here.. http://www.ps-bridge-scripts.talktalk.net/
They have helped me put this script together.
#target bridge if( BridgeTalk.appName == "bridge" ) { appendDesc = MenuElement.create("command", "Append Description", "at the end of Thumbnail"); } appendDesc.onSelect = function () { var win = new Window('dialog','Append Description'); win.g10 = win.add('group'); win.g10.st1 = win.g10.add('statictext',undefined,"Append Description"); win.g10.st1.alignment=["fill","fill"]; win.p1= win.add("panel", undefined, undefined, {borderStyle:"black"}); win.p1.alignChildren=["fill","fill"]; win.g20 = win.p1.add('group'); win.g20.spacing=10; win.g20.orientation = 'row'; win.g20.rb1 = win.g20.add('radiobutton',undefined,'Append'); win.g20.rb2 = win.g20.add('radiobutton',undefined,'Replace'); win.g20.cb2 = win.g20.add('checkbox',undefined,'Add Carriage return'); win.g20.rb1.value=true; win.g30 = win.p1.add('group'); win.g30.spacing=10; win.g30.orientation = 'row'; win.g30.st1 = win.g30.add('statictext',undefined,'Please enter new description data...'); win.g40 = win.p1.add('group'); win.g40.spacing=10; win.g40.orientation = 'row'; win.g40.et1 = win.g40.add('edittext'); win.g40.et1.preferredSize=[350,20]; win.g50 = win.p1.add('group'); win.g50.spacing=10; win.g50.orientation = 'row'; win.g50.bu1 = win.g50.add('button',undefined,'Process Selected Files'); win.g50.bu1.preferredSize=[170,30]; win.g50.bu2 = win.g50.add('button',undefined,'Cancel'); win.g50.bu2.preferredSize=[170,30]; win.g50.bu1.onClick = function(){ if(win.g40.et1.text == ''){ alert("No text has been entered"); return; } var sels = app.document.selections; if(sels.length < 1){ alert("You need to select your documents before running this script"); win.close(1); return; } win.close(1); if ( !ExternalObject.AdobeXMPScript ) ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript'); var AppendDesc = win.g20.rb1.value; if(win.g20.cb2.value){ var newDesc = "\n"; }else{ var newDesc ="";} newDesc += win.g40.et1.text.toString(); app.synchronousMode = true; for(var a in sels){ var thumb = sels[a]; var xmp = new XMPMeta(thumb.synchronousMetadata.serialize()); if(AppendDesc){ var dCount = xmp.countArrayItems(XMPConst.NS_DC, "description"); if(dCount>0){ var desc = xmp.getLocalizedText(XMPConst.NS_DC, "description", null, "x-default"); desc += newDesc; }else{ desc = newDesc; } }else{ desc = newDesc; } xmp.setLocalizedText( XMPConst.NS_DC, "description", null, "x-default", desc ); var newPacket = xmp.serialize(XMPConst.SERIALIZE_USE_COMPACT_FORMAT); thumb.metadata = new Metadata(newPacket); } } win.show(); }; -
8. Re: How append to group metadata "Description"?
Sverk Sep 8, 2013 12:19 PM (in response to Philip Cord)Really Great Indeed !
From a quick glance through the script it seems you have done it all for me.
Unfortunately there will not be time for me to try it on today,
but I will sure report back soon on my progress.
Thanks a lot Philip !
Sverker
-
9. Re: How append to group metadata "Description"?
Sverk Sep 8, 2013 12:49 PM (in response to Sverk)I couldn't wait trying to figure out how to use the script but can't find it,
tried the help function but found no instructions on that.
So I have to ask for some help on this as well.
Where do I install the script?
How do I run it after I have made my selection in Bridge?
Should it be integrated in Bridge somehow and run from in there?
Or should it run on the outside, and yet work on what is selected inside Bridge?
Help appreciated!
-
10. Re: How append to group metadata "Description"?
Philip Cord Sep 8, 2013 12:59 PM (in response to Sverk)Yes there isn't too much information about scripts in Bridge, hope this helps.
Copy and paste the script into ExtendScript Toolkit or a plain text editor, save the file with a .jsx extension.
To find the folder to where it needs to be saved, open Bridge, select Preferences - Startup Scripts
At the bottom click the "Reveal Button" this will open the folder where the script should be saved.
Re-start Bridge and accept the new script.
To use, select your documents, then mouse right click menu and select "Append Description"
Good luck.
-
11. Re: How append to group metadata "Description"?
Sverk Sep 8, 2013 2:02 PM (in response to Philip Cord)Beautiful!
With the instructions from you installation and running was simple.
And it works very well just the way it should.
Good idea to include a CR option also, but unfortunately that feature does not work. Don't know why, but I could probably figure that out.
Thanks A Lot Philip! Splendid help with a very useful direct solution to what has been both a tedious chore for me. And a risky chore too, risk of losing important previously entered Description metadata, a risk which occurs because all the Description field contents is selected (blue) when opening the field. If I forgot to deselect it with the mouse and just started to type in text, it works as a Repalce.
But no more,
Thanks again,
Sverker
-
12. Re: How append to group metadata "Description"?
Philip Cord Sep 8, 2013 2:09 PM (in response to Sverk)When the checkbox is checked a carriage return is put after the original data so the new data is on it's own line.
Happy that it is working for you Sverker.
-
13. Re: How append to group metadata "Description"?
Sverk Sep 8, 2013 2:36 PM (in response to Philip Cord)Yes, that's what I thought it would do, but it didn't the first times I tried.
But now it works, CR indeed gets added, all OK,
Thanks!
BTW: I don't get it how the MArk as Helpful works.
I certainly mean your help has been Helpful indeed!
Sverker

