This repository is a C++ rewrite of the tool grc by Radovan Garabik.
Warning
This software is NOT in a working state and should not be used. Please only use this code for educational or development purposes!
- 1. About
- 2. Changes
- 3. How to Contribute
- 4. Features
- 5. Installation
- 6. Usage
- 7. Acknowledgements
- 8. Licenses
grc (Generic Colouriser) is a tool for adding color to command-line output. This project, grcpp, aims to provide a modern, efficient, and extensible implementation, while still being able to be a drop-in replacement of the original tool using C++.
Grcpp aims to be faster than the original grc, that is why i decided to go for a single binary (opposed to grc wich uses another program called grcat to colorize the output) and utilize multithreading.
Now it should be pretty clear, that grc only is a wrapper for the underlying grcat (also part of the grc project) which can induce some performance overhead, so i decided to build this program into a single file, which simply utilizes threads to colorize the output(s).
My daily machine is a very old laptop where grc sometimes induces some noticable lag, i think for the most machines grc is just fine, but for me personally its to slow, thats why i decided to rebuild it in C++ in a performance optimized way.
- If you find any issue with the code, please just open an issue through GitHub. If you don't have a GitHub Account (and don't want to create one), just send an email to schilling.malte@googlemail.com.
- If you want to contribute code to this repo, just open a Pull Request through GitHub.
Note
Proper instructions for contributing to grcpp will be added later.
If you want to contribute to the colorfiles, please open a pull request on this repo!
- Drop-in replacement for grc.
- Improved performance and maintainability with modern C++.
A Makefile is included. Right now the Makefile only builds the program or the tests, but there is no install target or something like that right now.
Note
Proper instructions for building and installing grcpp will be added soon.
Usage examples and documentation will be provided as the project progresses. When the project enters beta state, the usage will be the same as grc.
Special thanks to Radovan Garabík for creating the original grc tool.
This project is licensed under the terms of the GNU General Public License v3.0 or later.
The original grc project is licensed unter the GNU General Public License v2.0 or later.
This project uses third party librarys, which are under different licenses. Details are in the directory THIRD_PARTY_LICENSES/.
- Catch2 -- Boost Software License 1.0
- Boost librarys -- Boost Software License 1.0
- Colorfiles -- Unlicense