https://github.com/stridsvagn69420/magicfix
Command-line tool to repair your file extensions
https://github.com/stridsvagn69420/magicfix
c command-line cpp cross-platform file-extension-converter file-extensions files magicbytes magicnumbers
Last synced: 12 months ago
JSON representation
Command-line tool to repair your file extensions
- Host: GitHub
- URL: https://github.com/stridsvagn69420/magicfix
- Owner: Stridsvagn69420
- License: eupl-1.2
- Created: 2023-08-13T22:20:33.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-05-19T17:46:25.000Z (about 1 year ago)
- Last Synced: 2025-06-25T05:05:05.403Z (about 1 year ago)
- Topics: c, command-line, cpp, cross-platform, file-extension-converter, file-extensions, files, magicbytes, magicnumbers
- Language: C
- Homepage:
- Size: 83 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# magicfix
Command-line tool to repair your file extensions
File signatures are from both [Wikipedia](https://en.wikipedia.org/wiki/List_of_file_signatures) as well as [ftyps.com](https://www.ftyps.com/).
The tool only depends on the C Standard Libraries so it practically compiles anywhere, even on your phone!
## Usage
### Tool
```bash
magicfix /path/to/file.ext some.file.lol ../more/.dotfiles
```
### Library
This project is also designed to be used as a library. Just clone or submodule this repository into your include-Path. You should be able to access it with:
```c
#include
```
The full documentation is available in the [Wiki](https://github.com/Stridsvagn69420/magicfix/wiki/libmagicfix).
## Installation
This section is only about self-compilation. Check the [Release Page](https://github.com/Stridsvagn69420/magicfix/releases) for prebuilt binaries.
### Windows (MSVC)
#### Requirements:
- Visual Studio 2022
- Desktop C++ Workflow
#### Instructions
1. Open Visual Studio and clone the repository: `https://github.com/Stridsvagn69420/magicfix.git`
2. Switch to Folder View in the Project Explorer
3. Select `magicfix.exe` as the Start Element
4. (Optional) Choose your desired build target (`x64-Release` by default)
5. Build the Project with `Ctrl` + `B`
6. The tool is located at `./out/build/{build-target}/magicfix.exe`
### Windows (MSYS2) and Unix
#### Requirements:
- `cmake`
- `make`
- `gcc` or `clang`
- `git`
- UCRT recommended (Windows only)
#### Instructions:
1. Clone the repository: `git clone https://github.com/Stridsvagn69420/magicfix.git && cd magicfix`
2. Build the repository: `make` (Also define the env variable `CC_NATIVE` to optimize for your CPU)
3. Install the program on your systen: `sudo make install` (Unix only)
Or use the Linux One Line Installer™️:
```bash
git clone https://github.com/Stridsvagn69420/magicfix.git && cd magicfix && make && sudo make install && make clean && cd .. && rm -rf magicfix
```