lolcat in c
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
alistair 266eb0b83d vertical pattern repeat 4 years ago
c-colours@e2078d7050 link col lib 4 years ago
.gitmodules link col lib 4 years ago
Makefile vertical pattern repeat 4 years ago
colcat.c vertical pattern repeat 4 years ago
demo.png help text, args, and custom gradient 4 years ago
readme.md help text, args, and custom gradient 4 years ago

readme.md

colcat (lolcat)

Another lolcat clone, in 2020.

image showing help text in rainbow colour

This is probably the least feature-complete version of lolcat, (the cat clone that makes the output rainbow), but I wrote it anyway and probably won't do any more work on it. I wrote this to test my colours library that I'm writing for a simple flat-shaded 2D game I've been working on for a while in bits and pieces.

It seems to mostly be compatible with other ANSI codes now.

Options:

Usage: colcat [args] [--] [FILES]

Concatenate files (or standard input) and print on the standard
output, with a rainbow colour. The colour range and repeat
distance can be specified.

Args:

      -h           Print help text and exit
      -w <int>     Width, in chars, of the rainbow sequence
      -r <int>     The amount the hue is rotated on new lines
      -s <int>     The hue to start the rainbow at
      -e <int>     The hue to end the rainbow at

It is the norm for these programs to fuzz the rainbow a bit, and provide more options for the frequency and animation options. Mine doesn't have animation, and it is deterministic.

Compared to other versions this one is slightly more vibrant and uses truecolour. This means the rainbow is slightly more accurate, but if your terminal doesn't support truecolour then it will output garbage (I don't check any terminfo stuff, or check that the output is a tty).

It is also about 9K larger than jaseg's version, of course it is still more performant than the ruby/node/python versions, it just might have bugs. :)

Installation

git clone https://git.topost.net/alistair/colcat.git
cd colcat
make install

Installs colcat to /usr/local/bin/

Similar Programs