AerisG222 / NExifTool

.Net wrapper for the excellent ExifTool
MIT License
32 stars 14 forks source link

How to write semicolon separated values in XPKeywords? #12

Open PeterCodar opened 5 years ago

PeterCodar commented 5 years ago

According to your write example

readonly List<Operation> UPDATES = new List<Operation> {
            new SetOperation(new Tag("comment", COMMENT)),
            new SetOperation(new Tag("keywords", new string[] { "first", "second", "third", "hello world" }))
        };

it should be possible to write multiple values to a tag.

I'm looking for the correct syntax to write your above values "first", "second", "third", "hello world" as 4 separate values in the tag "XPKeywords".

The target is to write them to a *.jpg file and read them with the built-in windows 10 explorer.

Actually, your above code write the 4 values as first|second|third||hello world in the *.jpg file and the win 10 file explorer read it as only 1 value.

Could you please tell us, how to use your functions WriteTagsAsync or OverwriteTagsAsync with multiple values, separated by a semicolon as I would enter them manually in Win10 file explorer?

AerisG222 commented 5 years ago

Hello,

Sorry, I don't have much time to look at this right now, and I do not have easy access to win10 to test. Do you have a working example of calling exiftool directly to set the values as you would like? If so, that would be very helpful when I find some time to investigate this further.

Thanks, Mike

PeterCodar commented 5 years ago

In the meantime I have downloaded your code, changed the ListSeparator "|" in \Writer\Operation.cs, Line 8, to ";" and everything works as expected. It would be great if you would let the user choose the separator in ListSeparator programmaticaly, without changing the source code itself .-)

AerisG222 commented 5 years ago

Thanks that is very helpful.

There are a lot of things I'd like to change/update! Feel free to submit a PR if you'd like, otherwise I'll try to add that next time I can get in there.