Help with script that imports metadata from csv file

Post Reply
randym
Posts: 27
Joined: 08 Jan 06 20:40
Location: Virginia, U.S.

Help with script that imports metadata from csv file

Post by randym » 14 Jul 19 19:32

I have followed the instructions at
https://repository.idimager.com/openres ... D96EA3BFD6
to import text from a csv file to the dc:description field of two image files. When I click on “import,” the activity window at the bottom left does a quick flitter but the image files are unaffected. I considered the possibility that the data was being written to the database and not to the file, so I did the operation “save metadata to file” and the dc:description field still does not update.

To guard against the possibility that I populated the csv input file incorrectly, I did the following: (1) for one image, I saved the dc:description field to a csv file (call it tem.csv) using the context menu script Metadata>Export Metadata to CSV file, (2) I edited tem.csv to have a different dc:description field, and (3) I used the edited tem.csv as my input file to import the new dc:description field using the procedure at the link above. I get the same result as above.

Any help would be greatly appreciated.

Thanks, Randy

sanphotgn
Posts: 308
Joined: 26 Aug 07 18:06

Re: Help with script that imports metadata from csv file

Post by sanphotgn » 15 Jul 19 1:21

I have used this script in the past. I just tried it. After a few tries/reminders ...

My first field is the path to the file and file name in quotes: "E:\......\picture.jpg"
My second field is in quotes, because it is more than one word: "place this into Description"

It worked.

I am using this version of Photo Supreme: 4.3.0.1713
I am using this version of the script locally: 1.4

If you are using a later version of Photo Supreme, let me know and I will try that.
Photo Supreme 3.3.0.2602 (64 bits) (Windows)

randym
Posts: 27
Joined: 08 Jan 06 20:40
Location: Virginia, U.S.

Re: Help with script that imports metadata from csv file

Post by randym » 15 Jul 19 3:44

Thanks so much for the time you have taken with this. You did what I did except you put both the filename and the description in quotes. I made that change and I get the same non-result.

I am using the latest version of PS: 4.3.4.2141 (64 bit)
The script version is 1.40 as indicated in the top of actual script file. I don't know what you mean by "locally." Again, I followed the instructions in the link I gave in my previous email. The script I'm using cannot be accessed using the context menu.

Thanks,
Randy

sanphotgn
Posts: 308
Joined: 26 Aug 07 18:06

Re: Help with script that imports metadata from csv file

Post by sanphotgn » 15 Jul 19 13:54

I installed 4.3.4.2141 (64 bit).

The script worked.

My csv file has headers:

Code: Select all

Something, Narrative
"E:\...\_85F8362.jpg", "place into Description"
I tried without headers and it worked. In either case make sure the "First line holds ..." is enabled or disabled, depending on the csv file.

After choosing the csv file, you should see the "Filename Link Column" field automatically populate with the correct field. Using my example, "Something" automatically appears in the field.
randym wrote:
15 Jul 19 3:44
I don't know what you mean by "locally."
Locally ... I download the scripts and run them via Tools - Scripter.
Photo Supreme 3.3.0.2602 (64 bits) (Windows)

randym
Posts: 27
Joined: 08 Jan 06 20:40
Location: Virginia, U.S.

Re: Help with script that imports metadata from csv file

Post by randym » 15 Jul 19 15:47

Thanks again for your help. I obviously am doing something wrong. So I will document here what I'm doing in detail.

This image shows that image "E:\aaaa slide scans\test script\imgx01.jpg" initially has dc:description = "current description"

Image

This image shows the contents of the csv file xxx_quotes.csv

Image

This image shows the screen just prior to my clicking "import"

Image

This image shows that after clicking "import" the dc:description field for the image file is unchanged.

Image

As I wrote in my initial post, I'm not sure if the script writes to the image file or to the database, or whether the details panel shows the image file metadata or the corresponding fields in the database. So I have "saved metadata to file" after the import and the details panel still shows that dc:description is unchanged.

Randy

sanphotgn
Posts: 308
Joined: 26 Aug 07 18:06

Re: Help with script that imports metadata from csv file

Post by sanphotgn » 15 Jul 19 16:21

See if this works ... I was using metapad (but you can use Notepad, ...) ...

Open your favorite text editor.

Copy the cells from your Excel file and paste into your text editor. You may have to enter the comma between the fields. Save as a csv. Give it a new file name than the Excel one. Make sure it saves as a csv and not txt.
Photo Supreme 3.3.0.2602 (64 bits) (Windows)

randym
Posts: 27
Joined: 08 Jan 06 20:40
Location: Virginia, U.S.

Re: Help with script that imports metadata from csv file

Post by randym » 15 Jul 19 18:01

Success!! Thanks so much.

For others' reference, I note that I was able to use the excel concatenate function to insert quotes and commas and then paste into notepad, and the notepad csv file worked without any further modification.

Post Reply