Catmandu icon indicating copy to clipboard operation
Catmandu copied to clipboard

Color output

Open nichtich opened this issue 8 years ago • 2 comments

Color output on command line would be nice. I implemented CSV and JSON in color for wdq but it's a hack.

nichtich avatar Apr 07 '16 18:04 nichtich

Yes, color output would be cool. There are several tools to improve the CLI experience:

  • https://metacpan.org/pod/Term::ANSIColor

  • https://metacpan.org/pod/CLI::Helpers

vpeil avatar May 24 '17 12:05 vpeil

We use Term::ANSIColor in the Datahub::Factory project we maintain. (which actually runs on top of Catmandu libraries).

We implemented a quick, basic -v CLI option which allows us to do verbose output on STDOUT. Like status messages during complex processing. These messages are coloured.

See: https://github.com/thedatahub/Datahub-Factory/blob/master/lib/Datahub/Factory/Flash.pm

We don't colour log4perl log messages, because we use these primarily for logging to a custom file appender. But we could colour those given the possibility that log4perl also outputs to STDOUT if we configure it to do so.

netsensei avatar Oct 04 '17 14:10 netsensei