update image metadata with values from a csv file
Posted: Sun Dec 02, 2012 12:05 am
Hi,
I have the following situation I have tried to solve and I would like to get your advice in what would be the best(most straightforward) approach. Naturally, I would not want to take too many extra turns on the way if there is a "clean way" of doing it.
- flow gets as its input one csv file and many images whose metadata (probably an IPTC field) has a "code" as its value
- I would need to update that IPTC field with information from the csv file. I.e. the csv file has the following lines:
code;name;other;info
1234;product 1;565g;253mm
1435;product 2;300g;120mm
--> I would need to update the images' metadata so that, according to the example csv above, I would add first image's name "product 1" to the image(s) that has code "1234" as the value in a specific metadata field.
I hope I could explain this understandably... So my problem is that I'm not sure how to tackle this task.
- First I thought that I would need to convert the csv into xml and use XML Pickup to get its data, but I've run into problems when trying that and now I'm thinking that it might be a too complicated approach. I've tried to get it work with the help of this thread http://www.crossroads-world.com/en/Home ... osts&t=184 but I'm using a mac and haven't managed to successfully run the c2x-cmd through an applescript element. I run into "illegal option '-sep:'" and "illegal option '-m:'" errors with it all the time.
- I'm thinking that there might be an easier way possibly via scripting since I only need that one value from the csv to be inserted into existing metadata in each image, but I'm not sure how to do it.
- I also tried the opaque pickup but that's not meant for this type of thing (I think...)
Any ideas on how I should continue?
Thanks,
--patrik
I have the following situation I have tried to solve and I would like to get your advice in what would be the best(most straightforward) approach. Naturally, I would not want to take too many extra turns on the way if there is a "clean way" of doing it.
- flow gets as its input one csv file and many images whose metadata (probably an IPTC field) has a "code" as its value
- I would need to update that IPTC field with information from the csv file. I.e. the csv file has the following lines:
code;name;other;info
1234;product 1;565g;253mm
1435;product 2;300g;120mm
--> I would need to update the images' metadata so that, according to the example csv above, I would add first image's name "product 1" to the image(s) that has code "1234" as the value in a specific metadata field.
I hope I could explain this understandably... So my problem is that I'm not sure how to tackle this task.
- First I thought that I would need to convert the csv into xml and use XML Pickup to get its data, but I've run into problems when trying that and now I'm thinking that it might be a too complicated approach. I've tried to get it work with the help of this thread http://www.crossroads-world.com/en/Home ... osts&t=184 but I'm using a mac and haven't managed to successfully run the c2x-cmd through an applescript element. I run into "illegal option '-sep:'" and "illegal option '-m:'" errors with it all the time.
- I'm thinking that there might be an easier way possibly via scripting since I only need that one value from the csv to be inserted into existing metadata in each image, but I'm not sure how to do it.
- I also tried the opaque pickup but that's not meant for this type of thing (I think...)
Any ideas on how I should continue?
Thanks,
--patrik