fileformat ~main

Tool for recognizing file formats


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

"fileformat" is free software.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

fileformat

fileformat is a tool for detecting and identifying file formats.

Official repositories:

Ready-made packages

See: Download Page of OS-18

The page contains installation instructions for several packages, including fileformat.

Build from source

Preparing

Before building, you need to install a compiler for D (this project supports compilers dmd, gdc and ldc2)

This project can be built with either dynamic or static linking against the Amalthea library. Therefore, if you want to build this project from source, you must first build and install Amalthea, then return to these instructions.

Compilation and installation

To create the executable file:

$ make

You can also specify a compiler:

$ make DC=gdc

Installation (by default, main directory is /usr/local/):

# make install

After installation, the program is ready to use.

The Makefile defines the following variables:

  • DESTDIR — specifies the root directory for installing (empty by default);
  • PREFIX — specifies the base directory, such as usr/local or usr.

The installation directory is defined as $(DESTDIR)/$(PREFIX) in the Makefile.

You can install the program files in any directory. For example, to install into $HOME/.local:

make install DESTDIR=$HOME PREFIX=.local

To uninstall:

# make uninstall

If installed to a non-default location, use the same paths when uninstalling:

make uninstall DESTDIR=$HOME PREFIX=.local

Usage

fileformat <file> ... [-m|--mime] [--formats <directory>]
    Show format name, description and type
    (Audio, Video, Archives, etc.) for each specified file.
    If '-m' or '--mime' is specified, the program also displays
    the MIME type and its description.
    The '--formats' option specifies a directory containing JSON files
    that describe custom file formats.

Feedback

Questions, suggestions, comments, or bug reports:

[email protected]

You can also use the repository issue tracker.

Authors:
  • Eugene 'Vindex' Stulin
Dependencies:
amalthea
Versions:
0.4.4 2025-Oct-23
0.4.3 2025-Apr-23
0.4.2 2024-Jul-18
0.4.1 2024-Jun-18
0.4.0 2022-Sep-24
Show all 10 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 2 downloads this month

  • 25 downloads total

Score:
0.0
Short URL:
fileformat.dub.pm