You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An idea I have had for a while is to adjust the coloring policy so that it can apply to more situations that just 8-color terminal.
For example, the color codes could be different depending on the environment we want to output to:
8 color terminal
2 color terminal (with bold/reverse/underline)
HTML
...
Doing this would require:
Any script that wants to produce multiple output formats would need to close their color blocks. Currently many scripts (designed for the terminal) just switch to a new color. But to produce nice HTML, we need to close each block of color we have opened!
However, the vast majority of scripts won't ever be wanted for HTML output. If they ever are, then a layer to convert termcodes to HTML might be preferable.
Furthermore, anything targetting HTML will also need to escape lots of other character (< and > being the most obvious). Again, doing this by post-processing the output might be more appropriate.
The text was updated successfully, but these errors were encountered:
An idea I have had for a while is to adjust the coloring policy so that it can apply to more situations that just 8-color terminal.
For example, the color codes could be different depending on the environment we want to output to:
Doing this would require:
However, the vast majority of scripts won't ever be wanted for HTML output. If they ever are, then a layer to convert termcodes to HTML might be preferable.
Furthermore, anything targetting HTML will also need to escape lots of other character (
<
and>
being the most obvious). Again, doing this by post-processing the output might be more appropriate.The text was updated successfully, but these errors were encountered: