Skip to main content

Align columns in ASCII tables

Project description

tablign

Aligns columns in your ASCII tables.

PyPi Version PyPI pyversions GitHub stars PyPi downloads

gh-actions codecov Code style: black

Install with

pip install tablign
tablign in.txt out.txt

you can convert your input file

| A | 1.34|-214.1|
|CCCC | 55.534|   1131.1|

into

| A    |  1.34  | -214.1 |
| CCCC | 55.534 | 1131.1 |

Column widths are unified across the table, decimal dots are aligned, and tablign tries to be smart about column separators. Works for CSV, LaTeX, Markdown etc. By default, tablign reads from stdin and writes to stdout, so you can use pipes with tablign, too:

head -n in.txt | tablign

Usage from vim

Simply mark the table (shift-V), and type

:'<,'>:!tablign

Alternatives

GNU's column command is a mighty alternative:

column -t

See here for more alternatives.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tablign-0.3.6.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

tablign-0.3.6-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file tablign-0.3.6.tar.gz.

File metadata

  • Download URL: tablign-0.3.6.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for tablign-0.3.6.tar.gz
Algorithm Hash digest
SHA256 a0e4410046253855e234c1c865a86a724431c7e235eec6b4ed165a475f8a3ebf
MD5 f5764e708fde248cb4ab8197b70cfa93
BLAKE2b-256 bb1fb0ea158ffec6c4e2a00a7d85366347e38ec572881dc2d41aeae68c77dc5a

See more details on using hashes here.

File details

Details for the file tablign-0.3.6-py3-none-any.whl.

File metadata

  • Download URL: tablign-0.3.6-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for tablign-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c1c895be323271fa2e9be7c1c4e74d9d5387501b29c91c25181bd77a1d842ca3
MD5 5fd87151a641ae023f2f889e622ca9dc
BLAKE2b-256 d706cb36e59bc2d78a949fb28c8f0b7d665b0b3728a51001544958a5fe8aff82

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page