Automatic File Identifier
Project description
Automatic File Identifier
A simple program written to identify a file using the extension or using file signatures.
Failing to do either, implies that the file might be a text file with no signature or extension.
It is not intended to be a final solution that finds everything about a file.
i.e. the purpose is to provide mimes for popular identifiable formats.
It is to be integrated with another project called Advanced Pattern Finder.
Using
There is a signature downloader, which is tailored to download and store information found on File Signatures.
This creates a python file named signatures.py, which needs to be in the same folder as the program.
The program imports this and makes use of it.
import afi
list_mime_tuples = afi.identify(path_to_resource)#can be a folder or file path
# The above gives you a list of tuples which contain the mimes for each identified file
# It identifies using both extension and signatures
However, there is a second way of making use of it as well.
afi /path/to/file/or/folder
Author
Supratik Chatterjee
Issues
There are some(quite a lot I suspect) popular file extensions and signatures missing.
I believe there are way more than 650 extensions.
Should one find something missing, kindly do let me know.
Downloading
mkdir afi
cd ./afi
git init
git remote add origin https://github.com/supratikchatterjee16/afi.git
git pull origin master
pip install .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for auto_files_identifier-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13711ca66337ddcb1dcf5d3d516b8eb1e3060841c4bd6f83bbe64b11c43381d8 |
|
MD5 | 4d8d551c3cc289d6d32d332dbaaf5ed1 |
|
BLAKE2b-256 | ce3295e1702dcc1ea7b84199724d1ddc79ec63ea059a361865b5578604f26cc6 |