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.4.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

tablign-0.3.4-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tablign-0.3.4.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for tablign-0.3.4.tar.gz
Algorithm Hash digest
SHA256 420b72fe054e2bb9e6f50fcebf3fbf41e5a10172afbd7c6ad11167776a6539c2
MD5 df3f2a64d08282059d7fceeb64389c49
BLAKE2b-256 ac552d338dc76ea5eb5c61ea1eeb1e0a47ab42a26934076b2e387b194cd748c0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tablign-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for tablign-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8aef5474b45f681e5f11d77089452baa1075df6888521728b2a35e374a35ddd9
MD5 6a1496869216fff3c092feaddc00aa4e
BLAKE2b-256 9bb800e5a3ee5b9b1d762bc68962d21ad5a9921578b317fdd48b316f24344713

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