Hi,
I was pleased to find that BeautifulTable does support ANSI colors. I haven't explored the code yet so I have no idea how that works, but I would like to know if there's a "relatively easy" way to support other, non-ANSI codes.
The basic idea is, like ANSI colors, to have an API to add "tags" to be ignored, that is, tags that don't "count" in a cell's length and would be closed before the cell, should the cell be split on several lines. HTML-like codes might be nice, for instance:
A cell <r>partly in red.</r>
Of course, it would be possible to replace <r> with the ANSI code for red, and </r> with the ANSI code for the end of the color tag. But if there's a clear API to do this, I would prefer to using it.
I know this is kind of specialized, and the interest might seem pretty limited, so that's an open-ended question.
Thanks for this tool,
Hi,
I was pleased to find that
BeautifulTabledoes support ANSI colors. I haven't explored the code yet so I have no idea how that works, but I would like to know if there's a "relatively easy" way to support other, non-ANSI codes.The basic idea is, like ANSI colors, to have an API to add "tags" to be ignored, that is, tags that don't "count" in a cell's length and would be closed before the cell, should the cell be split on several lines. HTML-like codes might be nice, for instance:
Of course, it would be possible to replace
<r>with the ANSI code for red, and</r>with the ANSI code for the end of the color tag. But if there's a clear API to do this, I would prefer to using it.I know this is kind of specialized, and the interest might seem pretty limited, so that's an open-ended question.
Thanks for this tool,