From 5f2430c6a0e35c4981c02025635e6055c32bf5d6 Mon Sep 17 00:00:00 2001 From: Arukim Date: Sun, 3 Jul 2016 13:50:09 +0300 Subject: [PATCH] Added more pictures tags parsing --- exiftool.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/exiftool.go b/exiftool.go index 006a764..a87e0a2 100644 --- a/exiftool.go +++ b/exiftool.go @@ -15,6 +15,12 @@ const ( type Exif struct { DateTimeOriginal string + LensModel string + LensID string + ShutterSpeed string + Aperture string + ISO string + FocalLength string GPS struct { Latitude float64 Longitude float64 @@ -91,6 +97,18 @@ func parseOutput(out []byte) (*Exif, error) { if ok, _ := regexp.MatchString("Date/Time Original", field); ok { e.DateTimeOriginal = value + } else if ok, _ := regexp.MatchString("Lens Model", field); ok { + e.LensModel = value + } else if ok, _ := regexp.MatchString("Lens ID", field); ok { + e.LensID = value + } else if ok, _ := regexp.MatchString("Shutter Speed", field); ok { + e.ShutterSpeed = value + } else if ok, _ := regexp.MatchString("Aperture", field); ok { + e.Aperture = value + } else if ok, _ := regexp.MatchString("ISO", field); ok { + e.ISO = value + } else if ok, _ := regexp.MatchString("Focal Length", field); ok { + e.FocalLength = value } else if ok, _ := regexp.MatchString("GPS Latitude +$", field); ok { v, err := valueForCoordinateString(value) if err == nil {