filetype.py
filetype.py copied to clipboard
Add some file types from the Go version
Added some low hanging fruit file types from the Go version. Put Dcm under archive (as on the Go side). Didn't improve matroska detection or add docx, xlsx or pptx. Nice lib ^^.
Hey, @h2non what we need to do to merge this PR? Maybe I can help 🙂
https://github.com/h2non/filetype.py/pull/41/files#diff-ad453f8a0e9dcc5a7320fb8fa6e98de5R96-R99
all doc, xls and ppt are have the same file signature, so no matter which one checked will always detected as a doc type, because it is evaluated first.
:edit: and also the same case for docx, pptx, xlsx type which in current repository will be detected as zip archive type.
so here i am confused about how to implement this for ms office document types.
:update:
i think it's better to make a group type for doc file signature (magic number) to be application/x-ole-storage and determine which type by filename extension.