mimetype
mimetype copied to clipboard
Implement missing audio, document and image matching functions
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 added a new PR on this, checkout #3
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 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 |
hi, is someone working on this issue ? if no one work , i want to try
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.
I chose
- application/javascript
- text/x-lua
- text/x-perl
- text/x-python
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 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.
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
Is someone still working on this issue?
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.
@ahmedsharif865 if you know any other MIME types that should be supported just tell.
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 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
.
@gabriel-vasile is someone working on the issue? I would like to contribute to this project.
I would like to contribute too! I would know if there is a list of types with missing implementation?
@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
Hey, I added OWL file (xml variant) in one of my PR, would like to contribute more. What is up?
@gabriel-vasile, PR #128 implements XCF, PAT and GBR.