Open nkrabben opened 6 years ago
Yes, very happy to review any pull requests to improve this. You can see the fine free file magic here: https://github.com/file/file/tree/master/magic/Magdir
It doesn't have file extensions, but it does have some MIME types, e.g. https://github.com/file/file/blob/master/magic/Magdir/pdf
Hmm, does have some extension info, e.g.
https://github.com/file/file/blob/d3516f29966c52ebd0619839110edd6646540e0b/magic/Magdir/jpeg#L17-L21
But it looks a bit gnarly to parse. I guess look for the !:mime
and then backtrack to a non-!:
line and backtrack via the >
to put the name together?
The file tool also identifies a number of formats and would be useful to have in this combined registry.