• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

copy keywords into description-field

New Here ,
Mar 14, 2008 Mar 14, 2008

Copy link to clipboard

Copied

Hello,

I have to work on many pictures so i don't want to do every step for every picture. I have no experience with scription so i ask you.

I'm searching for a script (or somthing else) that copies the keywords of one file into the description-field of the same file automaticly.

Yours Robin from Germany
TOPICS
Scripting

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 28, 2008 Mar 28, 2008

Copy link to clipboard

Copied

Does nobody know how to do that?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 09, 2008 Apr 09, 2008

Copy link to clipboard

Copied

I'm looking for the same thing - ideally a complete copy of all metadata from one file to one or many others via a simple interface eg copy and paste special.

Metadata templates are too inflexible for my application.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Apr 15, 2008 Apr 15, 2008

Copy link to clipboard

Copied

I have just done a quick test and this seems to work.<br />Copies the keywords to the description field.<br />Make sure that you do a test first!<br />NB:Folder.userData Adobe/XMP/Metadata Templates, folder must exist.<br />Paul<br /><br />#target bridge<br />var items = app.document.selections; <br /> for (var i = 0; i < items.length; ++i) { <br /> var item = items; <br />var m = item.synchronousMetadata; <br />m.namespace = "http://ns.adobe.com/photoshop/1.0/"; <br />var Des = m.read("http://purl.org/dc/elements/1.1/","dc:description");<br />var Keywords = m.Keywords;<br />if(Des.length >0) {<br /> var Description = Des + ";"+Keywords;<br /> }else{<br /> var Description = Keywords;<br /> }<br /> KeywordsToDesc(m, Description);<br /> }; <br /><br />function KeywordsToDesc(metadata, Description) <br />{ <br />var strTmpl = "TempTmpl"; <br />var strUser = Folder.userData.absoluteURI; <br />var filTmpl = new File(strUser + "/Adobe/XMP/Metadata Templates/" + strTmpl + ".xmp"); <br />var fResult = false; <br />try <br />{ if (filTmpl.exists) <br />filTmpl.remove(); <br />fResult = filTmpl.open("w"); <br />if (fResult) <br />// CS3<br />{ filTmpl.writeln("<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 4.1-c036 46.276720, Mon Feb 19 2007 22:40:08 \">");<br />//CS2<br />//{ filTmpl.writeln("<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"3.1.2-113\">"); <br />filTmpl.writeln(" <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">"); <br />filTmpl.writeln(" <rdf:Description rdf:about=\"\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">"); <br />filTmpl.writeln("<dc:description>");<br />filTmpl.writeln("<rdf:Alt>");<br />filTmpl.writeln("<rdf:li xml:lang=\"x-default\">"+Description+"</rdf:li>");<br />filTmpl.writeln("</rdf:Alt>");<br />filTmpl.writeln("</dc:description>");<br />filTmpl.writeln(" </rdf:Description>"); <br />filTmpl.writeln(" </rdf:RDF>"); <br />filTmpl.writeln("</x:xmpmeta>"); <br />fResult = filTmpl.close(); <br />metadata.applyMetadataTemplate(strTmpl, "replace"); <br />filTmpl.remove(); <br />} } <br />catch(e) <br />{ fResult = false; } <br />return fResult; <br />};

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 16, 2008 Apr 16, 2008

Copy link to clipboard

Copied

Thank you!!
It works perfect.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 30, 2008 Nov 30, 2008

Copy link to clipboard

Copied

Thanks really!
Good Luck.
______
My Si tes

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 19, 2009 Nov 19, 2009

Copy link to clipboard

Copied

Hello,

I am hoping someone will be able to help me.  I am looking for a script that will take information that is typed into a custom metadat panel in Bridge CS4 and and automatically populate a designated IPTC field with the same information.

For example, I would like the information in the "Program Title" field of our custom panel to automatocally populate in the "Headline" field of the IPTC panel.

I am not as well versed in scripting as I would like to be and did manage to get our custom panel and an export script up an running but I still feel like I am drowning when I read this stuff....  I have found the following script in the forums and it seems like it should work if I can figure what needs to be changed and the repeat the changes for each field.

Code:

#target bridge

addNametoMeta = {};

addNametoMeta.execute = function(){   
  var sels = app.document.selections;  
  for (var i = 0; i < sels.length; i++){

var md = sels.synchronousMetadata;
    md.namespace = "http://ns.adobe.com/photoshop/1.0/";
    md.Source = sels.name;
  }
}

// this script only works in bridge
if (BridgeTalk.appName == "bridge"){

  var menu = MenuElement.create( "command", "Save Filename in Metadata", "at the end of Tools");
  menu.onSelect = addNametoMeta.execute;
}

Can anyone help?

Thanks,

Robin

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 20, 2009 Nov 20, 2009

Copy link to clipboard

Copied

LATEST

This should get you started...

#target bridge
addDetailToHeadline();
function addDetailToHeadline(){
if( xmpLib == undefined ) {
      if( Folder.fs == "Windows" )
      {var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.dll";}
      else {var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.framework";}
      var libfile = new File( pathToLib );
      var xmpLib = new ExternalObject("lib:" + pathToLib );
}
/////////// You will need to get your panel details into this sring
var str = "Photo ";
/////////////////////////////////////////////////
var sels = app.document.selections;
for(var a =0; a<sels.length;a++){
var thumb = sels;
   if(thumb.hasMetadata && sels
.type == "file"){
      var selectedFile = thumb.spec;   
      var myXmpFile = new XMPFile( selecte...









Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines