Coder Social home page Coder Social logo

Comments (3)

poetaman avatar poetaman commented on May 21, 2024 1

@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...

from arttime.

poetaman avatar poetaman commented on May 21, 2024

@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

from arttime.

ehaupt avatar ehaupt commented on May 21, 2024

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.

from arttime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.