Skip to content

cagritas/filesinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FilesInfo

FilesInfo is a Python toolkit for mapping file extensions to rich metadata and recommended execution platforms. It ships with an extensive extension catalog, powerful lookup helpers, and a convenient CLI for exploring the data.

Installation

Clone the repository and install the package in editable mode (or publish to PyPI/TestPyPI and install from there):

pip install .

The installation exposes the filesinfo command-line tool automatically.

Command-Line Usage

# Inspect platform recommendations for file names
filesinfo payload.exe archive.tar.gz

# List extensions supported on specific platforms
filesinfo --platform windows --platform linux --include-cross-platform

# Show detailed metadata for each match
filesinfo --platform macos --details

# Review dataset validation warnings
filesinfo --show-dataset-issues

For backwards compatibility the legacy run_demo.py script simply forwards to the same CLI entry point.

Python API Example

from filesinfo import file_info_expert, get_extensions_for_platform

print(file_info_expert("payload.exe"))
# ['windows']

print(get_extensions_for_platform("linux", include_cross_platform=False)[:10])

Updating the Dataset

Regenerate the MIME-driven extension dataset whenever you want the latest upstream metadata:

python3 scripts/update_extension_dataset.py

The command writes a fresh filesinfo/data/external_extensions.json file that is packaged with the library.

Tests

python3 -m unittest

The test suite verifies the core lookups, platform alias behaviour, and integration with the external dataset.

About

FilesInfo delivers fact-sheet style metadata for thousands of file extensions, pairing them with their typical platforms. It ships as both a Python library and a CLI tool, refreshed by an update script so you can keep your extension database current for security or automation workflows.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages