-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python-tabulate out dated / forked #384
Comments
@meeuw I think the path forward is to abandon tabulate and use https://github.com/Robpol86/terminaltables/ Terminaltables is a library that provides the absolute minimum for rendering tables. It can handle multi-line values in the cells. So if the output has newlines it will render correctly. I spiked a prototype a few days ago that I can't find now, but the idea is to use terminaltables to render our tables. But pre-process the rows (by converting the numbers to strings) before passing it into the terminaltables library. I'll spent a few hours tonight to put up a PR and we can iterate. |
Ah, great. I'd be very interested to see that. |
That sounds great, but I'm not sure how many people use the different table formats provided by tabulate. Anyway, tabulate's isint/isnumber string detection isn't very helpful for us and I think there are better ways for formatting html/wikitables/tsv etc. I really like the decimal separator alignment in tabulate:
I hope terminaltables is capable of this. |
We'll have to find out if it can do the decimal alignment. |
This was resolved by #388, which will be in the next release. |
This is fixed as of version 1.11.0. |
We are using a forked version of tabulate from pgcli and made some modifications for mycli as well.
I've found out from which commit tabulate was forked (a8a670f749c3b0aeaeb5683dfe44665ef19e3d82) and which version from pgcli we're using (560a3fb7c5825ca8a6ef676cc6ced6454f1bbeb2).
I've reconstructed history in this bitbucket branch (python-tabulate is hosted at bitbucket):
https://bitbucket.org/meeuw/python-tabulate/branch/mycli if we would have pushed our commits to upstream.
As you can see we are 95 commits behind python-tabulate/master I'll check if I can merge those changes.
I think it would be great to use python-tabulate as a site-package or a seperately published, forked version for dbcli/mycli.
The text was updated successfully, but these errors were encountered: