filetype.py icon indicating copy to clipboard operation
filetype.py copied to clipboard

Add some file types from the Go version

Open fzzylogic opened this issue 6 years ago • 2 comments

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 ^^.

fzzylogic avatar Aug 18 '19 04:08 fzzylogic

Hey, @h2non what we need to do to merge this PR? Maybe I can help 🙂

codefo avatar Nov 27 '19 23:11 codefo

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.

ixna avatar Nov 28 '19 10:11 ixna