Name, Description and Keywords are not recognized by Shutterstock

(Tobias) #21

Maybe we should split the thread?

Yes, That would be a good idea, but I have no clue how it works in this forum.

(Peter Cherry) #22

What is difference between these two (opposite direction and = instead of >) ?

-XMP-dc:Subject > IPTC:Keywords -XMP-dc:Title > IPTC:ObjectName
-IPTC:Keywords=xmp-dc:Subject -IPTC:ObjectName=xmp-dc:Title

(Steve) #23

Ah, so sorry! Copied the wrong line from the terminal; I’d been trying a few things and went too far back in the history. This does work for me in Bash:

exiftool '-IPTC:Keywords<xmp-dc:Subject' '-IPTC:ObjectName<xmp-dc:Title' image.jpg

Note the lack of spaces between the tag names and that I had to quote each argument separately. Hopefully that will work for you.

[edit: actually the spaces don’t matter, but enclosing each argument in quotes does.]

(Steve) #24

The equal sign (=) assigns the value following it to the tag; > or < copies the tag in the direction of the arrow. Using your example:

The first line will copy the contents of XMP-dc:Subject to IPTC:Keywords and copy XMP-dc:Title to IPTC:ObjectName
The second line will set IPTC:Keywords to the literal value “xmp-dc:Subject” and IPTC:ObjectName to the literal value “xmp-dc:Title” which isn’t really what I wasn’t trying to do. :slight_smile:

(Christian Kanzian) #25

Yes, your are right. Following works in cmd.exe

exiftool "-IPTC:Keywords<xmp-dc:Subject" "-IPTC:ObjectName<xmp-dc:Title" image.jpg

with input image.jpg

Subject:	IPTC tags test, exiftool
Title:	title 1

results in

Object Name:	title 1
Keywords:	IPTC tags test, exiftool


(Peter Cherry) #26

Perfect. It really works in Exiftool.
Problem is it is not working in LUA script, because the script will not handle double " "
I tried:

A) cmd_options[1] = “-IPTC:Keywords<xmp-dc:Subject” “-IPTC:ObjectName<xmp-dc:Title”

B) I tried also directly into:
exif_cmd = “exiftool “…””"…tostring("-IPTC:Keywords<xmp-dc:Subject" “-IPTC:Keywords<xmp-dc:Subject”)…"""…" -overwrite_original “…”"" … imgexp … “”"

But script will not run at all with any of these options.

(Christian Kanzian) #27

@P_Cherry You have to escape the quotes with \. Otherwise they get interpreted by LUA itself and not passed to the cmd.exe as they are. Please correct me if I am wrong here.

cmd_options[1] = "-XMP-dc:Subject>IPTC:Keywords\" \"-IPTC:ObjectName<xmp-dc:Title"

The outer quotes are required to save it as string. The whole command is build at the end and there I added quotes as well. So for cmd_options[1] the second quote is skipped.

exif_cmd = "exiftool ".."\""..tostring(cmd_options.value).."\"".." -overwrite_original ".."\"" .. imgexp .. "\""

For your case the script could be much more simplified as you do not need all this options?

(Peter Cherry) #28

@pk5dark: Perfect, it is really working with escapes now. Thanks a lot.

Yes, I will simplify the script for my purpose. Is it possible to specify the whole path to exiftool, not to have to copy it into Windows folder?

e.g. exif_cmd = "c:/Programs/exiftool "…