harvard-lts / fits

File Information Tool Set
http://fitstool.org
GNU Lesser General Public License v2.1
92 stars 46 forks source link

include container `metadata` for additional formats besides zip #365

Open pwinckles opened 1 year ago

pwinckles commented 1 year ago

Currently, FITS will only generate a metadata element for zips that looks like the following:

  <metadata>
    <container>
      <originalSize toolname="Droid" toolversion="6.5.2" status="SINGLE_RESULT">34318329</originalSize>
      <compressionMethod toolname="Droid" toolversion="6.5.2" status="SINGLE_RESULT">deflate</compressionMethod>
      <entries totalEntries="16" toolname="Droid" toolversion="6.5.2" status="SINGLE_RESULT">
        <format name="EPUB" number="1" />
        <format name="Extensible Markup Language" number="1" />
        <format name="Graphics Interchange Format" number="1" />
        <format name="JPEG 2000 JP2" number="1" />
        <format name="JPEG File Interchange Format" number="1" />
        <format name="MPEG-4" number="1" />
        <format name="Office Open XML Document" number="1" />
        <format name="OpenDocument Text" number="1" />
        <format name="PDF/A" number="1" />
        <format name="PDF/X" number="1" />
        <format name="Plain text" number="1" />
        <format name="Portable Network Graphics" number="1" />
        <format name="Rich Text Format (RTF)" number="1" />
        <format name="TIFF EXIF" number="1" />
        <format name="Waveform Audio" number="1" />
        <format name="ZIP Format" number="1" />
      </entries>
    </container>
  </metadata>

This information is extracted by DROID. However, FITS is currently only able to collect this information for zip files. It would be nice if it were able to use DROID to get the same information for additional formats, notably gzip and 7zip.