Skip to main content

Align columns in ASCII tables

Project description

tablign

Aligns columns in your ASCII tables.

gh-actions codecov Code style: black awesome PyPI pyversions PyPi Version GitHub stars PyPi downloads

With

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.

Usage from vim

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

:'<,'>:!tablign

Installation

tablign is available from the Python Package Index, so with

pip install tablign

you can install.

Testing

To run the tests, simply check out this repository and run

pytest

License

This software is published under the GPLv3 license.

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

Uploaded Source

Built Distribution

tablign-0.3.1-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tablign-0.3.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2

File hashes

Hashes for tablign-0.3.1.tar.gz
Algorithm Hash digest
SHA256 5a37061a51a60f75ffc108c49b4cb108b1e233480a48b81345426e523c80ddf4
MD5 46aa60582f1d34a9168153a710c1d6c1
BLAKE2b-256 658647cef1e5aab51f951aefdbaa7ea8d063ecbc80d6e46a926e1104862aeaff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tablign-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2

File hashes

Hashes for tablign-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9c21aa92f155fb9285f4f6885b0a5f3e0a57149ec9d7887cbcc1fdfb05df0c3b
MD5 75ea8e0e261bda651dae4b96ab3835e6
BLAKE2b-256 1efcf70c8074365210f7a458d930a4218590059d3684c98023c5c97f3baf58cd

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