Skip to main content
Participant
April 3, 2020
Question

Script for search in keywords

  • April 3, 2020
  • 3 replies
  • 1031 views

I'm totally new on Bridge and i'm not able to understad how to solve a problem or where i can search for understand how to solve by myself.
The matter is related to the keywords.

I need to export in a csv file the information stored in bridge and i'm able to do with this script founded here in another post (thanks!)

https://www.ps-scripts.com/viewtopic.php?f=72&t=24358&sid=6529114a378b6e37ff888bf74ba105cf

 

I've added some tag keyword to the image file for categorize it, for example family name and category.
ex
Family name (tag name)
- Name1
- Name2
.....

Category (tag name)
- Category1
- Category2

 

if i run this script i have a field with inside the comma separated values of the above tag for example Name1;Category1 grabbed from this part of the script

 

var Keywords = md.read("http://ns.adobe.com/photoshop/1.0/","Keywords").toString().replace(/,/g,';');
if(Keywords == undefined) Keywords ='';
Line += csvtab + Keywords;
}

 

How can add also the tag name for have something like this Family name:Name1; Category:Category1 in this field of the exported csv file?
Not just the value but also the tag name where this value is inside. I need a way for search for every listed value in this fields keywords for find which is its related tag. Every tag value has a unique value.

 

Thanks for your time and for your help!

 

 

This topic has been closed for replies.

3 replies

Stephen Marsh
Community Expert
Community Expert
April 7, 2020

Looking at the raw data which is XML formatted:

 

 

<dc:subject>
   <rdf:Bag>
      <rdf:li>This is a keyword string</rdf:li>
   </rdf:Bag>
</dc:subject>

 

 

Are you referring to dc:subject ???

 

Or put another way, using the Extract Metadata script for Bridge, this is the result:

 

FileName Keywords
layers-sets.psd This is a keyword string

 

Are you referring to the Keywords column header?

 

hwmasterAuthor
Participant
April 8, 2020

i don't know anthing about, i don't know if i'm searching for dc:subject. I'm lokking for this in the exported file

Keyword -> Family name
- Name1 (one of the possible value of this keyword)
- Name2 (one of the possible value of this keyword)

 

in the csv /excel file ...

 

FileName         |  Keywords
layers-sets.psd  |  Family name:Name1 ; ..... (other keyword ..)


Thanks!

 

 

 

Legend
April 7, 2020

There is no such thing as tag name.
There are parent and child keywords which may or may not be enabled.

You can try my Folder List Export script which lets you export a list of files with keywords and other metadata. Once its in a spreadsheet, Excel/VBA will let you manipulate that data any way you like.

https://exchange.adobe.com/creativecloud.details.101130.utility-script-pack-for-bridge.html

Stephen Marsh
Community Expert
Community Expert
April 4, 2020

I'd like to help, however, I really don't understand. Perhaps including screenshots would help...

hwmasterAuthor
Participant
April 7, 2020

Thanks Stephen_A_Marsh.

Unfortunately i didn't have any screenshoot at the moment. The problem is export from bridge to csv not only the value of the tag used for every single image but also the name of the tag (the hierarchical name that belong to this value)

If this is the tag name and its values:

Family name (tag name)
- Name1
- Name2

with this code:

......

var Keywords = md.read("http://ns.adobe.com/photoshop/1.0/","Keywords").toString().replace(/,/g,';');
if(Keywords == undefined) Keywords ='';
Line += csvtab + Keywords;
}

....... (write to csv thereaded value -> https://www.ps-scripts.com/viewtopic.php?f=72&t=24358&sid=6529114a378b6e37ff888bf74ba105cf)

i have only the field kewyord, in the csv file, with only the value Name1 (tag for image). My goal is get also the tag name for have in the field this value Family name:Name1; ......

 

Thanks for your time.

 

Regrads

Stephen Marsh
Community Expert
Community Expert
April 7, 2020