barasher / go-exiftool

Golang wrapper for Exiftool : extract as much metadata as possible (EXIF, ...) from files (pictures, pdf, office documents, ...)
GNU General Public License v3.0
250 stars 44 forks source link

Metadata writing : test array fields #44

Closed barasher closed 3 years ago

barasher commented 3 years ago

Add tests to check if arrays are written correctly

_Originally posted by @barasher in https://github.com/barasher/go-exiftool/pull/40#discussion_r675110112_

barasher commented 3 years ago
barasher@linux:/tmp$ exiftool a.jpg -j | grep Keywords
  "Keywords": ["a","b","c"],
barasher@linux:/tmp$ exiftool -Keywords= a.jpg
    1 image files updated
barasher@linux:/tmp$ exiftool a.jpg -j | grep Keywords
barasher@linux:/tmp$ exiftool -Keywords=d -Keywords=e a.jpg
    1 image files updated
barasher@linux:/tmp$ exiftool a.jpg -j | grep Keywords
  "Keywords": ["d","e"],
barasher commented 3 years ago

https://github.com/barasher/go-exiftool/pull/48