n-ham / lolcat-cc

fast cross-platform c++ implementation of lolcat
Other
17 stars 1 forks source link

Option clarification. #3

Open ljramalho opened 2 years ago

ljramalho commented 2 years ago

This is not an issue, but...

I can't find any explanation about the options, as they are different from the one in the original lolcat(rb) and lolcat-c.

In my debian, I did "apt list --installed > pack.txt", so I have a long text file to test Using "cat pack.txt | lolcat-cc ..." with the various options, I couldn't understand part of them.

1) I can't understand what the option "-f: format" do. Sometimes it do zig zag pattern others it does sloping pattern.

2) I'm Assuming "-zz" is a zigzag pattern, is it correct?

3) The option "-g=[d]" seems to change the slop angle of the color strips, but this option seems to be ignored when used in conjunction with option -zz. Besides, calling "-g=[d]" gradient, seems incorrect, as if not describe exactly what the option really do. However, if we look to this option as the speed at which color change (lets call it gradient indeed), I guess the final result, from the perspective of multiple lines, seems like a change in the sloping.

4) Printing a long file, even not applying option "-zz" it seems that the +/- (zig zag) pattern is triggered some times. Other times sloping seems negative other times sloping seems positive, I can't find a way to control this, there is no consistent presentation.

5) Option "-ps" seems does nothing, at least in linux.

6) I can't spot any difference in using or not option "-tw=[i]".

7) I can't spot any difference in using or not option "-w=[i]".

For short, seems there is no consistent pattern presentation, even when not using any option!

I hope I you did understand me.

Sorry my lousy English.

n-ham commented 2 years ago

Howdy, thanks for checking lolcat-cc out..

  1. -f is for formatting special characters that appear as 1 character but are really multiple characters in the text, eg. Try neofetch and terminal animations with and without formatting

  2. Yep zigzag is the option to always zigzag. I didn't play for very long but never figured out how to do anything but gradient +-1 for zigzag so that's why that always has the same gradient.. you can use the -g=[d] option to have a fixed positive or negative gradient, values between 0 and 1 work best..

  3. See 2.

  4. Without using the zigzag or gradient options you will get positive gradient, negative gradient and zigzag about 33% of the time each.. you can force zigzag with that option and positive/negative gradient with the gradient option.

  5. Option PS is to print in PowerShell on windows as it has a different background colour it needs different colour codes..

  6. Lolcat-cc replaces tabs with spaces, tw option is to specify how many spaces to replace each tab with, eg. Try piping some indented code and play with the tw

  7. The width option should change the width of each strip of colour, eg. Try 1, 3, 5 etc.

Also in the options i stands for integer and d stands for double/decimal.

Let me know if that answers all your questions or if I missed anything or you have further follow up questions..

Would love to know what you think of it, how it compares to other versions etc..

n-ham commented 2 years ago

I was just fixing a few things and noticed I had never implemented replacing tabs with spaces, I have fixed this now.