samvera / hydra-works

A ruby gem implementation of the PCDM Works domain model based on the Samvera software stack
Other
24 stars 14 forks source link

PR to address Issues 336 337 #338

Closed kefo closed 6 years ago

kefo commented 6 years ago

This addresses issues #336 and #337 .

kefo commented 6 years ago

@escowles I'm gently tagging you only because you were kind enough to comment on the issue in the first place. Let me know if you see a problem with this...

escowles commented 6 years ago

@kefo This looks good to me — my only question is whether we always have dates from ExifTool. Assuming we do always have them, then using the dates from the better tool sounds like the way to go.

kefo commented 6 years ago

@escowles Well...

I took a JPEG, a TIFF, and a PDF and stripped the EXIF data from them and ran them through FITS. FITS revealed no creation or modification dates in the output, of any kind, for any tool (Tika, Exiftool, NLNZ). Before I stripped the data, these values were in the EXIF and exiftool successfully extracted the data each time.

It seems that if the dates are in EXIF, then exiftool will extract the dates. If the dates are not in EXIF, then no tool, including exiftool, will report dates, and thus FITS does not report values for creation/modification fields.

So I can't answer definitively that exiftool will always report dates but this limited test suggests that to be the case if those dates are in the EXIF data. And, if those dates are in the EXIF data, then FITS will report this fact from a number of tools, exiftool being the most reliable.

escowles commented 6 years ago

@kefo I would have expected it to fall back on the file creation/modification timestamps from the filesystem. But that test makes me pretty confident that if there are dates, then ExifTool will have dates, and this won't be hiding info from other tools.

kefo commented 6 years ago

@escowles That's exactly what I expected to happen too, which was my motive behind making sure the file contained valid EXIF data, checking what FITS reported, and then stripping the EXIF to see the new result in FITS.