Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use ANSI color codes if they are not supported #50

Closed
nikigawlik opened this issue May 23, 2021 · 0 comments
Closed

Don't use ANSI color codes if they are not supported #50

nikigawlik opened this issue May 23, 2021 · 0 comments
Labels
enhancement New feature or request quickie Can be done within an hour

Comments

@nikigawlik
Copy link
Owner

Feature branch: None

If the console doesn't support ANSI codes, the log becomes hard to read.

Code_2021-05-23_13-43-43

Suggested implementation:

Use a helper function for color codes, instead of the lookup dictionary that is used right now. This function can check if ANSI codes are supported. This can probably only be checked once on startup and remembered.

I found this for testing if ANSI is supported, the first response seems promising: https://stackoverflow.com/questions/7445658/how-to-detect-if-the-console-does-support-ansi-escape-codes-in-python

Pro:

  • More readable console output for when ANSI isn't supported

Con:

  • Lot's of small code changes across the repo are needed everywhere where color is used right now
  • Users could just configure their terminal properly 👀
@nikigawlik nikigawlik added the enhancement New feature or request label May 23, 2021
@Flashing-Blinkenlights Flashing-Blinkenlights added the in-progress We're working on it label May 26, 2021
@Flashing-Blinkenlights Flashing-Blinkenlights added the quickie Can be done within an hour label May 26, 2021
Flashing-Blinkenlights added a commit that referenced this issue May 26, 2021
@Flashing-Blinkenlights Flashing-Blinkenlights added pending review Waiting for sound judgment and removed in-progress We're working on it labels May 26, 2021
@Flashing-Blinkenlights Flashing-Blinkenlights removed their assignment May 26, 2021
@Flashing-Blinkenlights Flashing-Blinkenlights removed the pending review Waiting for sound judgment label Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request quickie Can be done within an hour
Projects
None yet
Development

No branches or pull requests

2 participants