Skip to content

CatKasha/yet-another-filetype-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 

Repository files navigation

yet another filetype checker

kinda similar to filetype.py but:

supported formats

  • flv
  • jxr
  • tif
  • psd
  • psb
  • dds
  • woff
  • woff2
  • ico
  • cur
  • swf
  • 7z (only non splitted archive)
  • pdf
  • jpg
  • gif
  • jif
  • png
  • apng
  • qoi
  • bmp
  • mov
  • avif
  • heic
  • mp4
  • m4v
  • m4a
  • 3gp
  • 3g2
  • epub
  • ora
  • aac
  • mp3
  • flac
  • mkv
  • webm
  • webp
  • avi
  • wav
  • ani
  • ts
  • mpg
  • torrent
  • jxl
  • html
  • blank (fake extension, file filled with zeros/null bytes)

how to use

as standalone app:

.\filetype_checker.py sample.png
apng

as library:

import os.path
import filetype_checker

file_path = "sample.png"

if (os.path.isfile(file_path)):
    # if extension was not found it will return None
    file_extension = filetype_checker.guess_ext(file_path)
    
    if (file_extension):
        print("File extension:", file_extension)
    else:
        print("Cant guess file extension")
else:
    print("Given path is not a file")

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages