This is a small project that I created because I wanted to colorize my ASCII art. The tool is built around the Catppuccin color palette - one of my favorites.
The Catppuccinifier colorizes your text files (.txt) by randomly assigning a color to each character. You can choose one out of the four Catppuccin themes that will be used to colorize your text.
Prerequisites: Make sure to have ruby 4.0.3 (or higher) and a corresponding version of bundler installed.
- Clone the repository
git clone https://github.com/gitnickolson/catppuccinifier.git- Enter the directory
cd catppuccinifier- Install dependencies
bundle install- Start the program
bundle exec bin/catppuccinifyYou will then be prompted to enter the filepath to the file you want to print colorized.
The result will be printed to your terminal.
> bundle exec bin/catppuccinify
Please enter the path to the file you want to catppuccinify.
> ~/ascii_art/spark_collection.txt
Please choose a catppuccin theme:
1. Latte
2. Frappe
3. Macchiato
4. Mocha
> 4You can also use it by passing the filepath and the theme as CLI args
> bundle exec bin/catppuccinify ~/ascii_art/spark_collection.txt 4
The theme parameters can be passed as numerics or as their respective titles written out.
That means that these are both valid
> bundle exec bin/catppuccinify ~/ascii_art/spark_collection.txt 2
> bundle exec bin/catppuccinify ~/ascii_art/spark_collection.txt Frappe
Add the following line to your .zshrc configuration file (and replace the example path with the actual path that leads to your Catppuccinifier directory)
source ~/path/to/directory/catppuccinifier/plugin.zsh
You will then be able to run the script by just calling catppuccinify from any directory. The filepath and theme parameters are also able to be autocompleted.
