exif CSV import – two questions

Started by Arfa, April 28, 2023, 05:29:38 PM

Previous topic - Next topic

Arfa

As a (non-pro www) coder and widget builder I am so impressed as to how much you have packed in as regards options and functionality. Way cool! Thank you.

I am currently working on placating a Wordpress image-upload plugin; captions + alt\text

1 –
CSV:
SourceFile,ImageDescription
C:\xampp\htdocs\bRama\exif\ac-bowing.jpg,The sangha pays respects
exiftool -csv="C:\xampp\htdocs\bRama\newInfo.txt"  "C:\xampp\htdocs\bRama\exif"I have my CSV file parallel with images and the exif data is written. Awesome! On importing the images the plugin recognises 'ImageDescription' and sets that as the caption. It continue to default using the filename as the alt\text.

Searching the plugin docs they show a windows file-properties box > details.
They say: 'Title' will become the alt\text and 'Subject' the caption.
However – on looking at my 'newly edited exif files' the windows properties show both title+subject
I will querry them separately.

I have some images from another setup and they show IPTC data with the tag 'Caption' and exif showing 'Image Description' – both with same text. When these images are uploaded the alt\text works.
I have searched exifTool docs and found plenty of ref. (31 in FAQ alone) to IPTC but... it ain't exactly gibberish [started with Fortran IV :)] but *options* – and one switch wrong and...
Unless there is a simple suggestion regarding the above para.
Is there a simple tag sequence to set ITPC with csv import?

2 -
Many of my image captions have commas. Currently I strip them [building new CSV with php] to allow for the comma delimiter.
Is there a tag to import tab-delimited data?
I experimented with various permutations of the -T switch but no success.

I appreciate that this (1-) is a bit of a long and somewhat convoluted querry.
I have a 'good enough' working scenario and the alt\text and commas would be the preferred, but optional, cherry.

any thoughts?

Phil Harvey

Quote from: Arfa on April 28, 2023, 05:29:38 PMIs there a simple tag sequence to set ITPC with csv import?

I think you mean any option to set IPTC with CSV import?  You can set individual IPTC tags with CSV import in the same way that any other tags are imported.

QuoteIs there a tag to import tab-delimited data?

There is no command-line option for this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Arfa

Thanks again Phil.
It has been a long haul sorting this and...
A bit of feedback in case someone else hits this wall.

Q1 - It became clear that this is situation specific; not an exifTool issue. There are several settings in exifTool that will show a Windows title/subject setting. I had to trawl the plugin source code to find an array that mods exif tags. Once I had that I then had to experiment with topline CSV tags... SourceFile, etc.
The plugin guys did point me to another setting that changes the tag priorities; exif, iptc, etc.
So, quite a few variables so sift but I persevered.
>> also big issues (plugin freeze) with characters in my captions – notably ampersand and apostrophe. Easily enough fixed once I tracked that.

Q2 - tab-delimited... no problem dropping commas from my captions.

Bottom line – exifTool is awesome. Thank you.