rasa icon indicating copy to clipboard operation
rasa copied to clipboard

Make rasa cli have an option to turn off colors

Open hsm207 opened this issue 3 years ago • 3 comments

What problem are you trying to solve?

I want to ran rasa data validate in my pipeline and print the results as a comment in a PR. I save the results in a file like this:

rasa data validate --quiet 2>&1 | tee data-validate.log

The problem is that the ANSI code are saved as part of the output and it makes the results hard to read.

The workaround is to do this:

rasa data validate --quiet 2>&1 | tee data-validate.log |
sed 's/\x1b[[0-9;]*m//g' >
data-validate-no-color.log

What's your suggested solution?

rasa data validate --no-colors

Examples (if relevant)

No response

Is anything blocking this from being implemented? (if relevant)

No

Definition of Done

data-validate.log from rasa data validate --no-colors --quiet 2>&1 | tee data-validate.log does not have ANSI color code.

hsm207 avatar Sep 30 '21 14:09 hsm207

Hi there Is this still relevant? I think i can work on it

thiagohdaqw avatar Jul 16 '22 15:07 thiagohdaqw

Please consider using NO_COLOR envvar.

https://no-color.org/

virtualroot avatar Jul 22 '22 11:07 virtualroot

This is a good name for an envvar. It is also used in coloredlogs to disable colors. Thanks, @virtualroot!

https://coloredlogs.readthedocs.io/en/latest/api.html?highlight=no_color#environment-variables

thiagohdaqw avatar Jul 22 '22 19:07 thiagohdaqw

➤ Maxime Verger commented:

:bulb: Heads up! We're moving issues to Jira: https://rasa-open-source.atlassian.net/browse/OSS.

From now on, this Jira board is the place where you can browse (without an account) and create issues (you'll need a free Jira account for that). This GitHub issue has already been migrated to Jira and will be closed on January 9th, 2023. Do not forget to subscribe to the corresponding Jira issue!

:arrow_right: More information in the forum: https://forum.rasa.com/t/migration-of-rasa-oss-issues-to-jira/56569.

sync-by-unito[bot] avatar Dec 19 '22 12:12 sync-by-unito[bot]