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

Script to Export and Import Keywords and Metadata

Community Beginner ,
Aug 02, 2005 Aug 02, 2005

Copy link to clipboard

Copied

I have a requirement to mass upload and download keywords and various metadata fields (i.e. File Name, Date Created, City, Country, Document, Title, etc.) into an external database from the Adobe Bridge. Ideally it would be compatible to .txt, .csv, etc type of database format. Currently I have to accomplish this task one at a time. I have an immediate need to upload 1000 plus pictures and various text fields into my website to share with others and be able to sell my pictures online.

My immediate is for exporting the metadata and keywords.

Does anyone know of a script that is aavailable?

Arnold
TOPICS
Scripting

Views

9.1K

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
Community Beginner ,
Jan 12, 2007 Jan 12, 2007

Copy link to clipboard

Copied

I have a script to export metadata from Bridge to CSV.

email me off-line

rstucky@starband.net

Regards

Bob

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 ,
Mar 22, 2007 Mar 22, 2007

Copy link to clipboard

Copied

Hi,
I was looking for some sort of metadata export thing and just read through this thread and tried out the script and it works great. I was just wondering though, is there anyway to make this work kinda like the InDesign Contactsheet script (IE, write to an indesign file) and maybe a pop up box to select which metatdata information to write? ?

what I was really looking for is a contact sheet with the meetadata , so i get a little thumbnail too. but i really can't find anything out there that does this.

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 ,
Mar 29, 2007 Mar 29, 2007

Copy link to clipboard

Copied

yes.. me to???

Is there a way of creating contact sheets that show the keywords etc???

I am in the process of designing an image library & I need to show certain clients their images with keywords so that they can approve them??? help!!

amy..

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
Explorer ,
Mar 30, 2007 Mar 30, 2007

Copy link to clipboard

Copied

Amy_Kane@adobeforums.com wrote:
>
> Is there a way of creating contact sheets that show the keywords etc???
>
> I am in the process of designing an image library & I need to show certain clients their images with keywords so that they can approve them??? help!!

I can get you a tweaked version of CSX if that would help.
http://ps-scripts.sourceforge.net/ContactSheetX/csx.html

I'm not planning on offering full metadata caption support for a couple of
months but I can handle just keywords fairly easily.

-X

--
for photoshop scripting solutions of all sorts
contact: xbytor@gmail.com

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 ,
May 30, 2007 May 30, 2007

Copy link to clipboard

Copied

Hi,

I installed the script to Bridge and it even lists it under the "manage scripts" dialogue box... unfortunately, when I export the contact sheet by going to tools>indesign>contact sheet, all it exports is the same information it exported before - not the metadata.

Can anyone walk me through this?

Thanks!

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 ,
May 30, 2007 May 30, 2007

Copy link to clipboard

Copied

I dont think that I ever got this to work either???

sorry!

but if anyone helps you... id like to know also!

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 ,
Sep 21, 2007 Sep 21, 2007

Copy link to clipboard

Copied

Read through this thread and found lots of helpful info. I'm having a problem with script that reads metadata correctly in Bridge CS2 but fails to retrieve the variables under:

ps1.namespace = "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/"

when trying to run it under Bridge CS3. I found the same issues trying the iterations in this thread. What am I doing wrong?

Here's my script:

//------------------------------------------------------------------
RunScript4.run = function( )
{
var thumbs = getBridgeThumbnails ( TYPES.PHOTOSHOP_OPENABLE, false, true);
try
{
var f = File.saveDialog("Enter Filename for Export:", "Double delimited file:*.txt");
if(!f)
{
Window.alert ("Export Metadata:" + "\n" + "No filename entered.");
}
else
{
f.open("w");
// Create header line
var headerLine = f.write ( "~Filename~,~Title~,~Author~,~Copyright~,~Address~,~City~,~State~,~Zip~,~Phone~,~Email~,~Website~" + "\n") ;
// Loop through selected thumbnails
for ( var i = 0; i < thumbs.length; i++)
{
thumb = thumbs;
ps1 = thumb.metadata;
// write metadata to file
var imageData = f.write ("~" +thumb.name + "~,", metaData(thumb),"\n");
}
f.close();
//
if (i == 1)
Window.alert ("There was " + i + " record exported to " + f + ". ");
else
Window.alert ("There were " + i + " records exported to " + f + ". ");
}// end filename else
}// end try
catch(e)
{
// Errors handled here
}
}// end function

function metaData()
{
ps1.namespace = "http://ns.adobe.com/photoshop/1.0/";
fileInfo = "~" + ps1.AuthorsPosition + "~,~" + ps1.Author + "~,~" + ps1.Copyright + "~,~";

ps1.namespace = "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/";
fileInfo = fileInfo + ps1.CiAdrExtadr + "~,~" + ps1.CiAdrCity + "~,~" + ps1.CiAdrRegion + "~,~" + ps1.CiAdrPcode + "~,~" + ps1.CiTelWork + "~,~" + ps1.CiEmailWork + "~,~" + ps1.CiUrlWork + "~";

return fileInfo;
}
//-------------------------------------------------------------------

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
Community Beginner ,
Sep 22, 2007 Sep 22, 2007

Copy link to clipboard

Copied

There is a pretty good export metadata script up on my website.

www.creativescripting.net

Look for the barred rock scripts. It's in that set.

Regards

Bob
www.creativescripting.net
for all your Bridge and InDesign scripting needs

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 ,
Oct 28, 2007 Oct 28, 2007

Copy link to clipboard

Copied

Bob,

Thanks for the response these seem to be a great utilities. However, the script that you directed me to does not allow me to retrieve data from the specific entries I need as listed above. i.e. "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" - address, city, state, zip, phone, email and website.

The script I have works fine in CS2. I would like to migrate completely to CS3, but I can't get this script to work. Hopefully someone knows a solution.

Paul

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 ,
Oct 28, 2007 Oct 28, 2007

Copy link to clipboard

Copied

i have been over seas for a while... I have come back & installed the script and its working!!!

just wanted to say Thanks!!!

I am in the middle of creating a Image Library for our company and we are developing it with Index Server and I need to supply lists of the keywords used & this script is great as it gives me a file with all the keywords in one document...

thanks again!

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
Community Beginner ,
Oct 28, 2007 Oct 28, 2007

Copy link to clipboard

Copied

I will have a look at it; however, at this time I am horribly buried in work. I'll get to it as quickly as I can.

Bob

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 ,
Jan 28, 2008 Jan 28, 2008

Copy link to clipboard

Copied

Not sure how active this forum is, but will try anyway. I am looking for a script to insert in an action to add Filename in Metadata through Bridge. I am a Photographer and work w/ LR V1.3.1.
The LR works fine, but when exporting images, the app will not tick the Copyright Status Switch or the Copyright information.

I have written actions to overcome this, but still have to add Document Name to each file.

Is there a better way?

Thanks,
Alex@bachnickphoto.com

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 05, 2008 Apr 05, 2008

Copy link to clipboard

Copied

Hi folks,

This is really Great work!!! Thanks so much.

2 questions:
1.Is is possible to export directly to an access database table?
2.I am using CS3 but can only get the info for 3 images to show up any idea why.

By the way for any newbies like me you have to copy the code you see in the posting into notepad or Adobe ExtenScript Toolkit2 and save the file as a .jsx file.

Then in Bridge select edit/preferences/startup scripts and click the button "Reveal" to see where you scripts folder is on your system. Then you just save your file to that folder. Shut down Bridge reopen it and you will be asked if you would like to install the script. Once it's installed you will see it listed at the bottom of the tools drop down.

Here is my code:

#target bridge

if (BridgeTalk.appName == "bridge")
{
// Let's create our menu
var menu = MenuElement.create( "command", "Export File List to Excel", "at the end of Tools");
menu.onSelect = function(m) {
try
{
// Let's ask what the name of the output file
var f = File.saveDialog("Export file list to:", "Microsoft Office Excel Workbook:*.XLS");

// Write the column headings
f.open("w");
f.writeln("#,Image_Name,Copyright,");

// Let's get a list of all the visible thumbnails
var items = app.document.visibleThumbnails;

for (var i = 0; i < items.length; ++i) { var item = items; f.writeln(i + 1, ",\"", item.name, "\",\"", ListMetadata(item), "\",\"", "\"" ); } f.close(); } catch(e) { } } menu.onDisplay = function(m) { m.enabled = app.document.contentPaneMode == "filesystem" && app.document.visibleThumbnails.length > 0;
}
}

function ListMetadata(tn)
{
md = tn.metadata;
md.namespace = "http://ns.adobe.com/photoshop/1.0/";
varCopyright = md.Copyright + "\",\"" ;

return varCopyright;

}

Many Thanks
Sylvia

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 06, 2008 Apr 06, 2008

Copy link to clipboard

Copied

Paul, is this something like?

#target bridge
if (BridgeTalk.appName == "bridge" ) {
var menu = MenuElement.create( "command", "Export Info to Text File", "at the end of Tools");
menu.onSelect = function(m) {
try {
var f = File.saveDialog("Export file list to:", "Text file:*.TXT");
if ( !f ) { return; }
f.open("w");
f.writeln( "~Filename~,~Title~,~Author~,~Copyright~,~Address~,~City~,~State~,~Zip~,~Phone~,~Email~,~Website~" + "\n");
var items = app.document.selections;
for (var i = 0; i < items.length; ++i) {
var item = items;
f.writeln(item.name,',',ListMetadata(item) );
};
f.close();
} catch(e) {}
};
};

function ListMetadata(tn) {
md = tn.metadata;
md.namespace = "http://ns.adobe.com/photoshop/1.0/";
var fileInfo = "~" + md.AuthorsPosition + "~,~" + md.Author + "~,~" + md.Copyright + "~,~";
md.namespace = "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/";
var myCity = md.read("http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/", "Iptc4xmpCore:CreatorContactInfo/Iptc4xmpCore:CiAdrCity");
var myRegion = md.read("http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/", "Iptc4xmpCore:CreatorContactInfo/Iptc4xmpCore:CiAdrRegion");
var myPostCode = md.read("http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/", "Iptc4xmpCore:CreatorContactInfo/Iptc4xmpCore:CiAdrPcode");
var myCountry = md.read("http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/", "Iptc4xmpCore:CreatorContactInfo/Iptc4xmpCore:CiAdrCtry");
var myTel = md.read("http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/", "Iptc4xmpCore:CreatorContactInfo/Iptc4xmpCore:CiTelWork");
myTel = myTel.replace(/\n/g, ' ');
var myEmail = md.read("http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/", "Iptc4xmpCore:CreatorContactInfo/Iptc4xmpCore:CiEmailWork");
var myURL = md.read("http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/", "Iptc4xmpCore:CreatorContactInfo/Iptc4xmpCore:CiUrlWork");
var myAddress = md.read("http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/", "Iptc4xmpCore:CreatorContactInfo/Iptc4xmpCore:CiAdrExtadr");
myAddress = myAddress.replace(/\n/g, ' ');
fileInfo += myAddress + "~,~" + myCountry + "~,~" + myRegion + "~,~" + myPostCode + "~,~" + myTel + "~,~" + myEmail + "~,~" + myURL + "~";
return fileInfo;
};

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 07, 2008 Apr 07, 2008

Copy link to clipboard

Copied

Sylvia:-
It may be possible to export to workbook, but it would have to be done with VB.
Your second question, it might be that the fourth file is NOT a valid photoshop file. It might be better to change the code to selections and see if that works.

Paul.

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 ,
Oct 07, 2008 Oct 07, 2008

Copy link to clipboard

Copied

Paul R.,

Sorry I haven't been back to look at your response and help before today. This appears to be "right on" getting the information I need. I'm relatively new to scripting Bridge so I'll see if I can learn from your example and apply it to the script I have been using in CS2. Hopefully there won't be any script surprises in CS4.

Thanks again...
paulshoe

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 for answer

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