mimetype icon indicating copy to clipboard operation
mimetype copied to clipboard

Implement missing audio, document and image matching functions

Open gabriel-vasile opened this issue 6 years ago • 19 comments

Currently there are several matching functions not implemented, ex: doc, xls, flac, wav. Because of this there are file formats which are not detected by the library.

A good resource for file signatures is https://www.garykessler.net/library/file_sigs.html

gabriel-vasile avatar Aug 09 '18 20:08 gabriel-vasile

@gabriel-vasile added a new PR on this, checkout #3

theotow avatar Aug 22 '18 04:08 theotow

Hi, Does this includes sub-types not listed with the IANA and vendor specific subtypes ? It will be more helpful if needed subtypes are mentioned specifically to avoid any confusion. Regards.

WheeskyJack avatar Sep 16 '18 08:09 WheeskyJack

@WheeskyJack indeed, a list of not yet implemented mimes would be helpful. I will keep this issue open and update it with the latest needed mime types. For now:

Mime type Reference Stub
application/javascript https://github.com/file/file/blob/master/magic/Magdir/javascript js
text/x-lua https://github.com/file/file/blob/master/magic/Magdir/lua lua
text/x-perl https://github.com/file/file/blob/master/magic/Magdir/perl perl
text/x-python https://github.com/file/file/blob/master/magic/Magdir/python py
image/svg+xml - svg
model/x3d+xml - x3d
application/vnd.google-earth.kml+xml - kml
model/vnd.collada+xml - collada
application/gml+xml - xml
application/gpx+xml - gpx

gabriel-vasile avatar Sep 19 '18 16:09 gabriel-vasile

hi, is someone working on this issue ? if no one work , i want to try

TeuryBazzo avatar Oct 02 '18 19:10 TeuryBazzo

Hi, as far as I know no one is working on any of the missing mimetypes. If you decide to have a go, just tell which one you chose.

gabriel-vasile avatar Oct 03 '18 16:10 gabriel-vasile

I chose

  • application/javascript
  • text/x-lua
  • text/x-perl
  • text/x-python

TeuryBazzo avatar Oct 03 '18 18:10 TeuryBazzo

Hi, I'd like to do the mime types

  • image/svg+xml
  • model/x3d+xml

For this, check the tags of extension .svg and .x3d (<svg, <x3d) is good verification? if not, whats the best way?

TeuryBazzo avatar Oct 07 '18 02:10 TeuryBazzo

@TeuryBazzo You are on the right track, checking the existence of those tags is the way to detect these subtypes of xml.

For anyone interested, this is the list of mimetypes which need implementation:

Mimetype Stub
application/vnd.google-earth.kml+xml kml
model/vnd.collada+xml dae
application/gml+xml gml
application/gpx+xml gpx

The list is not limited, if anyone has a purpose for a mimetype to be added, just ask for it here, or better yet, add a pull request.

gabriel-vasile avatar Oct 09 '18 20:10 gabriel-vasile

Mimetype Stub
model/x3d+xml x3d
application/vnd.google-earth.kml+xml kml
model/vnd.collada+xml dae
application/gml+xml gml
application/gpx+xml gpx

There are also some missing video mime types in matchers/video_ftyp.go. The reference list of ftyp files can be found here ftyps.com

gabriel-vasile avatar Nov 19 '18 10:11 gabriel-vasile

Is someone still working on this issue?

ahmedsharif865 avatar Aug 07 '19 12:08 ahmedsharif865

Hi, the MIME types from the table in my last comment have all been added to the library. There are still some ftyp MIME types to be added, namely: image/jpx, image/jpm, image/jp2. If you want, you are welcome to add them to the library.

gabriel-vasile avatar Aug 07 '19 18:08 gabriel-vasile

@ahmedsharif865 if you know any other MIME types that should be supported just tell.

gabriel-vasile avatar Aug 08 '19 11:08 gabriel-vasile

NDJSON support is needed. Details can be found in issue. JSONL is another format we might add, but I'm not sure if the specification is done and they chose a MIME type for their format.

gabriel-vasile avatar Aug 30 '19 08:08 gabriel-vasile

@gabriel-vasile I will take a look at the image/jpx, image/jpm and image/jp2 types, if that is ok to you.

Edit: Formats image/jpx, image/jpm and image/jp2 added in PR #51. Note that in the image/jpx case, the file extension is jpf, not jpx.

ibraimgm avatar Oct 01 '19 23:10 ibraimgm

@gabriel-vasile is someone working on the issue? I would like to contribute to this project.

tebrizetayi avatar Mar 21 '20 11:03 tebrizetayi

I would like to contribute too! I would know if there is a list of types with missing implementation?

EclesioMeloJunior avatar Aug 11 '20 03:08 EclesioMeloJunior

@EclesioMeloJunior you can add support for linux timezone files or the different formats GIMP uses for graphics. https://github.com/gabriel-vasile/mimetype/issues/103 https://github.com/gabriel-vasile/mimetype/issues/102

gabriel-vasile avatar Aug 11 '20 06:08 gabriel-vasile

Hey, I added OWL file (xml variant) in one of my PR, would like to contribute more. What is up?

fahadsiddiqui avatar Sep 03 '20 20:09 fahadsiddiqui

@gabriel-vasile, PR #128 implements XCF, PAT and GBR.

ibraimgm avatar Oct 25 '20 14:10 ibraimgm