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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tablign-0.3.5.tar.gz
Algorithm Hash digest
SHA256 a4d073717030a170aa87b90d54db01a8e800320ee56902c7e7c5172e864e1244
MD5 686307f8e4aeab0e8ab059dcdedc5113
BLAKE2b-256 b96931df6c530a2dbeeb8eced3449dd8381b84b30a41ce0ed0aa7641ee0422ac

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tablign-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c128bb70f90d7437856fdcc0a69f0554b15d89c0ef767e67265f0f22d3080c01
MD5 ee81ea3c191779484452d8e1ab1e78e5
BLAKE2b-256 2428a3bb6252aa7a68d3c8d6fcfe710f0a25f8cd5ff5168fec1f6cc26543d559

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