https://github.com/tildearrow/mcformat
`cat` for Minecraft formatting codes
https://github.com/tildearrow/mcformat
Last synced: 10 months ago
JSON representation
`cat` for Minecraft formatting codes
- Host: GitHub
- URL: https://github.com/tildearrow/mcformat
- Owner: tildearrow
- License: unlicense
- Created: 2021-02-23T19:05:34.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-23T19:28:12.000Z (over 5 years ago)
- Last Synced: 2025-03-12T00:26:05.418Z (over 1 year ago)
- Language: C
- Size: 2.93 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mcformat
a `cat`-like utility for parsing Minecraft formatting codes into ANSI escape codes for viewing on a terminal.
## features
- `cat`-like - supports reading from stdin or files as arguments
- supports all 16 color codes
- supports all 6 format codes
- supports Minecraft 1.16 RGB color codes (§x)
- supports 24-bit color terminals and converts RGB codes to 256-color otherwise
- written in C for speed
## building
requires CMake.
```
mkdir build
cd build
cmake ..
make
```
if you are on a rush and cannot use CMake, you may compile this using any compiler, e.g.:
```
gcc -o mcformat main.c
```
## usage
```
./mcformat [FILES ...]
```
FILES is optional.
if FILES is not provided, reads from standard input; otherwise reads from the specified files.
## FAQ
> supported encodings?
UTF-8 only.
> does this support ampersand format codes too?
no, it does not. it only supports Minecraft standard section sign (§) formatting codes.
> does this support raw JSON text?
no, and it will not.