puremagic icon indicating copy to clipboard operation
puremagic copied to clipboard

Pure python implementation of identifying files based off their magic numbers

Results 18 puremagic issues
Sort by recently updated
recently updated
newest added

same (mp3) file, different name ... different output Make a copy: `sander@brixit:~/git/puremagic$ cp test/resources/audio/test.mp3 test/resources/audio/testblabla.bla ` Verify it's there with same size: ``` sander@brixit:~/git/puremagic$ ll test/resources/audio/test.mp3 test/resources/audio/testblabla.bla -rw-rw-r-- 1 sander...

Pure magic seems to be failing to detect some very common file types, like text files (.py, .txt, .md). ``` $ file changelog.txt changelog.txt: ASCII English text $ python3.6 -m...

enhancement

Better identify common files. Such as opening .docx/.pptx/.xlsx and viewing the XML file to figure out which exactly they are.

enhancement

A file with an .epub extension is extremely likely to be the zip+xml+html based, and extremely popular, e-book format rather than any form of INI configuration file. I cannot find...

Hello, I encountered a discrepancy when running a test with the following code: ``` python import puremagic print(puremagic.from_file("test/resources/images/test.webp", mime=True)) # prints "image/webp" with open("test/resources/images/test.webp", "rb") as f: print(puremagic.from_string(f.read(), mime=True)). #...

The Python 3.13 release notes mention `puremagic` as one of the alternatives for `imghdr` which was removed from the Standard Library so let's ensure that its tests pass on Python...

I've re-titled this as it got a bit off-track from the original purpose of the issue. @cclauss wanted to know if PureMagic could provide a 1:1 replacement of imghdr, to...

## Re-opening as #68 got a bit off-track from the original topic Looking at #67 regarding `imghdr` I started looking at the SGI File format as that needs some love...

Could close #12, but likely not (skip to conclusion for why) Based on trying to think of a way to help improve matches further (it's a great cure for my...