Commit Graph

1 Commits

Author SHA1 Message Date
456cef1090 xfstestsdb: Create a Table class
This class is designed to make it easy to print out data formatted as a
table. It was inspired by the prettytable Python module but is tailored
for how I intend to use it, including support for color schemes.

I use two different character sets for drawing borders. If color is
disabled, then I use basic ascii "+" and "-" characters. However, if
colors are enabled then I use characters from the Unicode Box Drawing
block to draw a table with rounded corners.

Finally, each table cell is formatted by calling the "do_format_cell()"
function. Table subclasses can override this function to implement their
own coloring schemes.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-02-15 15:57:21 -05:00