BetterConsoleTables icon indicating copy to clipboard operation
BetterConsoleTables copied to clipboard

Print tables side-by-side.

Open TheBlackPlague opened this issue 3 years ago • 3 comments

I wonder if there's a way to print two tables side by side rather than one after the other. Maybe via some string manipulation? I would love to hear from you.

TheBlackPlague avatar Apr 28 '22 14:04 TheBlackPlague

Unfortunately this isn't a supported feature (And probably won't be unless someone makes a PR for it)

The best you could do it just combine the tables, with a column of spaces in between (Just make 1 table).

douglasg14b avatar Apr 28 '22 21:04 douglasg14b

Unfortunately this isn't a supported feature (And probably won't be unless someone makes a PR for it)

The best you could do it just combine the tables, with a column of spaces in between (Just make 1 table).

I see. I probably might look into making a PR. I'm currently using this project for my own project: StockNemo. I'm aware my use case is way out of the intended use for this project.

TheBlackPlague avatar Apr 29 '22 21:04 TheBlackPlague

Mainly the reason I don't want to build support for it is:

  1. It's niche
  2. It may affect the baseline table rendering, which is a pain, and can lead to spaghetti if it relies on behavior branching
  3. To make it work nicely, some code redesign may have to occur (Such as "virtualizing" the console size, which may be the easiest approach 🤔 )
  4. The API should be straight forward
  5. Edge cases should be handled (Width overflowing for example)
  6. All of this must not negatively impact performance for the "fast path" of table rendering.

All of the above put it low on my priority list, which is already too long (This project and others) 😅


Essentially just more effort than I'm willing to commit at the moment. That said, feel free to hammer at it though! I'll be happy to participate in a PR.

douglasg14b avatar Apr 30 '22 19:04 douglasg14b