Skip to content

Add 'rich' option for nicer table lines - #19

Merged
rickwporter merged 1 commit into
mainfrom
rickwporter/rich-table
Nov 3, 2026
Merged

rickwporter merged 1 commit into
mainfrom
rickwporter/rich-table

Conversation

@rickwporter

Copy link
Copy Markdown
Owner

RATIONALE

Create rich option with nicer table lines.

CHANGES

  • Added OutputFormat.RICH.
  • Added RichTableRender
    • Derived from BaseTextTableRender
    • Implements the render() function using different TableGlyphs for divider lines
  • Updated PrettyTable with new rich option that uses a RichTableRender object for rendering.

EXAMPLE

Original (text):

+------------+----------+------------+
|  Column A  | Column 2 | Column III |
+------------+----------+------------+
|     A      |    B     |     c      |
|     1      |   1024   |   65535    |
| Washington |  Adams   | Jefferson  |
+------------+----------+------------+

Rich:

┏━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━┓
┃  Column A  ┃ Column 2 ┃ Column III ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━┩
│     A      │    B     │     c      │
│     1      │   1024   │   65535    │
│ Washington │  Adams   │ Jefferson  │
└────────────┴──────────┴────────────┘

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor
File Coverage [100%] 🍏
PrettyTable.java 100% 🍏
RichTableRender.java 100% 🍏
Total Project Coverage 99.91% 🍏

@rickwporter
rickwporter merged commit 4208aa1 into main Nov 3, 2026
1 check passed
@rickwporter
rickwporter deleted the rickwporter/rich-table branch November 3, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant