Live data from Hacker News

Colout – add colors to a text stream in your terminal

nojhan.github.io

1–10 of 41 posts

Re: Colout – add colors to a text stream in your terminal

#2
Not entirely sure of the feature overlap, but this seems to reinvent grcat and its frontend, grc [1], a little bit.

Grcat lets you configure commands with colour regexps. Then you just prefix the command with "grc", and it will colorize the output according the rules. It's useful to alias commands this way:

    $ alias make="grc make"
colout seems most useful when you are want to highlight arbitrary patterns independent of the command, eg. "tail some.log | colout ...".

[1] http://kassiopeia.juls.savba.sk/~garabik/software/grc/README...

Re: Colout – add colors to a text stream in your terminal

#4
The background image of this site causes a weird strobing effect on the screen of my MacBook Pro 6,2. Really odd.

When I drag it over to the cinema display it looks fine.

Noone else here in the office can see it, both those with good vision and those who are technically blind. Maybe I have special powers. Or a brain tumor.

EDIT: The tool is great btw :)

Re: Colout – add colors to a text stream in your terminal

#5

The background image of this site causes a weird strobing effect on the screen of my MacBook Pro 6,2. Really odd. When I drag it over to the cinema display it looks fine. Noone else here in the office can see it, both those with good vision and those who are technically blind. Maybe I have special powers. Or a brain tumor. EDIT: The tool is great btw :)

Does the same on my Thinkpad W520 - thought it was something to do with my panel.

Re: Colout – add colors to a text stream in your terminal

#6

The background image of this site causes a weird strobing effect on the screen of my MacBook Pro 6,2. Really odd. When I drag it over to the cinema display it looks fine. Noone else here in the office can see it, both those with good vision and those who are technically blind. Maybe I have special powers. Or a brain tumor. EDIT: The tool is great btw :)

Try this test page: http://www.lagom.nl/lcd-test/inversion.php

Re: Colout – add colors to a text stream in your terminal

#7
post #6

The background image of this site causes a weird strobing effect on the screen of my MacBook Pro 6,2. Really odd. When I drag it over to the cinema display it looks fine. Noone else here in the office can see it, both those with good vision and those who are technically blind. Maybe I have special powers. Or a brain tumor. EDIT: The tool is great btw :)

Try this test page: http://www.lagom.nl/lcd-test/inversion.php

Thanks. As always HN delivers the goods.

Re: Colout – add colors to a text stream in your terminal

#8
Just installed it via pip and gave it a try. I like it! I think I can already find some interesting uses for it. A couple of suggestions:

The website says:

  colout -r will give you the lists of available colors,     
  colormaps, themes and supported programming languages.
But I think that's a typo and should be 'colout -h'.

Also, a handy alias list of common use cases would be great.

Re: Colout – add colors to a text stream in your terminal

#9

I really like the idea of alternating the color of lines of output, although I might use something a bit less bold. Is there an easy way to have command piped through this in bash?

one problem of the 'alias yourcmd to yourcmd | colorize' is dealing with preserving the return code from the actual command, rather than the last in the pipeline.

It can be done with things liek $PIPESTATUS, but some sort of wrapper/function to do it would be nice.

Re: Colout – add colors to a text stream in your terminal

#10

The background image of this site causes a weird strobing effect on the screen of my MacBook Pro 6,2. Really odd. When I drag it over to the cinema display it looks fine. Noone else here in the office can see it, both those with good vision and those who are technically blind. Maybe I have special powers. Or a brain tumor. EDIT: The tool is great btw :)

Same to my 2012 MBP.
Post reply on HN