ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: toshimi on August 12, 2011, 04:08:19 AM

Title: import multiple keywords from csv file
Post by: toshimi on August 12, 2011, 04:08:19 AM
Hi Phil,
Thanks for great tool for all of photographers/developpers !

I would like to import keywords (actually iptc:keywords and xmp:subject) from csv file.
It works fine keyword is only one. However, I can not import multiple keywords from csv.
So, multiple keywords concatenated into one keyword if I do it.
I have made csv file refer to exiftool exported csv.
Please advice me.

Thanks,
Toshi
Title: Re: import multiple keywords from csv file
Post by: Phil Harvey on August 12, 2011, 07:36:01 AM
Hi Toshi,

Unfortunately CSV doesn't support arrays, so the list of keywords is stored as a string, but here are some ways around this problem:

1) When importing the .csv file, use the -sep option to separate the keywords into individual items (ie. -sep ", " if the .csv file was written with the default separator, or use the -sep option when creating the .csv file as well to choose a different separator).

2) Use JSON instead of CSV for your database file format.

- Phil
Title: Re: import multiple keywords from csv file
Post by: toshimi on August 12, 2011, 04:56:40 PM
Hi Phil,
I have tried -sep option and it works fine. Thank you very  much.

Toshi