Console colors plugin

I thought I’d share with everyone a new plugin I’m working on. I haven’t finished just yet. I ran through a couple of tests just to make sure it would work but I thought I’d put it out there in case anyone had any ideas or feedback.

The plugin is to add asni escape sequences to results. The idea would be be to add highlighting to values over a threshold or to categories etc.

prefix c: <http://myconsole/>

select
  if(?val > 100, c:bgRed(?val), ?val)
were {
  ?s ?p ?val
}

+--------------+
|   ?val       |
+==============+
|     30       |
|     40       |
|     110      | <--this line would be red
+--------------+

It will work in Linux and I think Cygwin but not Windows. There is a way to support that but requires a visual studio lib to be installed and it would probably give strange results in the webconsole but this is for a regular console so I’m not worried there. To avoid getting it mixed up with queries I would suggest wrapping queries in a sub query.

select
  if(?val > 100, c:bgRed(?val), ?val)
where {
   select { ....my regular query... }
}

ansi escape sequences allow overlapping selections so I thought I’d have two ways to construct a string. A single argument function for overlapping items that would include and opening and closing sequence. ie. c:bgRed(?val) and a no agument version that would be used with concat to construct strings. ie. concat(c:bgRed, ?val, c:bgDefault)

I don’t plan on including character movement but if someone could think of a good use for it I’d be happy to include it.

It’s not anything complicated but I thought it would be nice to have especially with the ML stuff if you’re doing some data exploration and want to get a feel for the dataset. Flagging outliers etc.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.