musselwhizzle / Focus-Points

Plugin for Lightroom to show which focus point was active in the camera when a photo was taken
Apache License 2.0
345 stars 42 forks source link

Considerations if moving from Exif txt to json #56

Closed musselwhizzle closed 7 years ago

musselwhizzle commented 7 years ago

Exiftools can output the metadata in a json format. Some things to consider

screen shot 2017-01-09 at 9 57 39 am

If using json, this will change the format display to the user in the metadata dialog. "AF Aperture" will now read as "AFAperture". This is not as user friendly. What does the real raw display as? Apparently exiftool is formatting it one way or another.

in json, it has strings and numbers. Will this parse well enough? In non-json, everything is treated like a string.

in json, it will output the binary chars \u000 chars which it seems the txt output doesn't handle. If this were to happen, would need to truncate the lines so it doesn't wrap or ideally just replace the entire line with (Binary data)

It was mentioned that if using json, could make a table of chars rather than looping over them. However, lua supports key names with spaces. This is perfectly legit code to lua

local t = {}
t["hello world"] = "hi"
t["another space"] = "spaces"

for key,value in pairs(t) do print(key,value) end

Using a table rather than loops would be a lot more efficient since multiple keys need to be found. This idea is independent of the format and only discussed here as it was brought up as a supporting point for json.

musselwhizzle commented 7 years ago

Judging by other metadata viewers, having the keys show up as "FocalLength" instead of "Focal Length" to the user is a deal breaker. This does leave 2 outcomes which can be made into separate tickets.

  1. I would like to see the binary data replaces with just (Binary data) whenever it occurs
  2. I would like to see a table of metadata instead of the looping over everything and searching.
musselwhizzle commented 7 years ago
  1. https://github.com/musselwhizzle/Focus-Points/issues/58
  2. https://github.com/musselwhizzle/Focus-Points/issues/57