Skip to main content

Format markdown tables in a file so columns align.

Project description

fmt-md-tables

license-mit repo-stars downloads latest-version python-versions conventional-commits

ci

Format markdown tables in a file so columns align.

Install

With uv — install as a global CLI tool:

uv tool install .

Editable / dev:

uv pip install -e .

Run without installing:

uvx --from . fmt-md-tables FILE

From PyPI (once published):

uv tool install fmt-md-tables

Usage

fmt-md-tables FILE                 # print formatted output to stdout
fmt-md-tables FILE1 FILE2 ...      # process many files (concatenated to stdout)
fmt-md-tables -i FILE1 FILE2 ...   # rewrite each file in place
fmt-md-tables -                    # read from stdin

Features

  • Pads cells to max column width per table.
  • Preserves alignment markers (:---, :---:, ---:).
  • Skips fenced code blocks (``` and ~~~).
  • Handles escaped pipes (\|).
  • Pads short rows with empty cells.

Example

Input:

| Filter | Index plan | Notes |
|--------|-----------|-------|
| `Filter::eq("col", val)` | Exact match | Best case |
| `Filter::ge("col", val)` | Range scan (start bound) | Uses linked-leaf traversal |

Output:

| Filter                   | Index plan               | Notes                      |
| ------------------------ | ------------------------ | -------------------------- |
| `Filter::eq("col", val)` | Exact match              | Best case                  |
| `Filter::ge("col", val)` | Range scan (start bound) | Uses linked-leaf traversal |

License

MIT

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

fmt_md_tables-0.1.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fmt_md_tables-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file fmt_md_tables-0.1.0.tar.gz.

File metadata

  • Download URL: fmt_md_tables-0.1.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fmt_md_tables-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8db143de217bec709e5caf4f1121146e523f7a3ed40bd28e5fd7556ade576771
MD5 d123e930d37ebfc57bd8d834c8a1fc74
BLAKE2b-256 ab0954523024c3dd7a45a18d32d5a6d113b18772beb5cd1c344ba0fa2fd0a492

See more details on using hashes here.

Provenance

The following attestation bundles were made for fmt_md_tables-0.1.0.tar.gz:

Publisher: release.yml on veeso/fmt-md-tables

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fmt_md_tables-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fmt_md_tables-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fmt_md_tables-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1dde2a0494ec3314983ff78c0130db1b05efcfadaed52f782e9b9347e3b06a5
MD5 a0d1cbc5e0e067e007c2998e70882866
BLAKE2b-256 d704e1b375a020ebf3ce847a119b162a35e50c1d1c9f47778e20d51ed10db53a

See more details on using hashes here.

Provenance

The following attestation bundles were made for fmt_md_tables-0.1.0-py3-none-any.whl:

Publisher: release.yml on veeso/fmt-md-tables

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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