Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: add support for lolcat #42

Closed
ehaupt opened this issue Oct 18, 2022 · 3 comments
Closed

feature request: add support for lolcat #42

ehaupt opened this issue Oct 18, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@ehaupt
Copy link
Contributor

ehaupt commented Oct 18, 2022

It would be nice to have support for a lolcat color filter 馃樅

@poetaman
Copy link
Owner

poetaman commented Oct 19, 2022

@ehaupt Yes it would be a nice feature to have. It's actually pretty simple to achieve that, though I didn't add it as there are so many filters possible, and I wasn't sure about the best interface. Consider this problem: Filters tend to have a lot of options, and every user would want a slightly different option. So let's say we add an option --filter '<filter command_with_options>'. If passed, arttime will execute this string '<filter command_with_options>' each time a new text art is loaded in arttime. While on a home system this might not be an issue. But adding an option like --filter '<filter command_with_options>' could make something like arttime an eye sore for ones IT team IMO. What are your thoughts on it?

There are two other ways we can go about:

  1. Add an option --filter <name> the string name won't be evaluated but act as a key to a set of filters we support with certain standard options. Like --filter lolcat would execute something like command lolcat -f...
  2. arttime implements a function in zsh to add random colors, and support both 16/256 colors.

Arttime already has some files with color filter applied using lolcat for a simple disco effect. Try the following:

arttime --nolearn -a butterfly2 -b butterfly3

To immediately get that same effect on any other art, do something like this (example for text artnews):

cd /path/to/share/arttime/textart/
lolcat -f news >news_lol1
lolcat -f news >news_lol2
arttime --nolearn -a news_lol1 -b news_lol2

@ehaupt
Copy link
Contributor Author

ehaupt commented Oct 19, 2022

Thank you for your explanation. Other project use an argument to pass arguments to external commands:

Eg.: scp(1):

     -o ssh_option
             Can be used to pass options to ssh in the format used in
             ssh_config(5).  This is useful for specifying options for which
             there is no separate scp command-line flag.  For full details of
             the options listed below, and their possible values, see
             ssh_config(5).

But your proposed solution is perfectly reasonable. Please feel free to close the issue.

@poetaman poetaman added the enhancement New feature or request label Oct 20, 2022
@ehaupt ehaupt closed this as completed Mar 2, 2023
@poetaman
Copy link
Owner

poetaman commented Mar 2, 2023

@ehaupt Btw, there is one more route possible for this. I had tested some color cat filters to see if they work. Most seem to have trouble handling escape sequences. The one filter that more or less works with least hiccups is this ruby implementation of lolcat:

arttime --nolearn -a winnepooh -b winnepooh2 -t "Ooops, colored bear" | lolcat

Here's a GIF:
arttime_lolcat_filter2

In future with people filing bugs on the maintainers of these filters will make them more resilient, and perhaps the faster C version will also be usable. Here's an example bug: busyloop/lolcat#110. Unfortunately none have 16-color support, they are either 256 color or RGB color...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants