Format markdown tables in a file so columns align.
Project description
fmt-md-tables
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8db143de217bec709e5caf4f1121146e523f7a3ed40bd28e5fd7556ade576771
|
|
| MD5 |
d123e930d37ebfc57bd8d834c8a1fc74
|
|
| BLAKE2b-256 |
ab0954523024c3dd7a45a18d32d5a6d113b18772beb5cd1c344ba0fa2fd0a492
|
Provenance
The following attestation bundles were made for fmt_md_tables-0.1.0.tar.gz:
Publisher:
release.yml on veeso/fmt-md-tables
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fmt_md_tables-0.1.0.tar.gz -
Subject digest:
8db143de217bec709e5caf4f1121146e523f7a3ed40bd28e5fd7556ade576771 - Sigstore transparency entry: 1389650333
- Sigstore integration time:
-
Permalink:
veeso/fmt-md-tables@702cdbb0f1a8947ac367f736889c9525a44d1682 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/veeso
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@702cdbb0f1a8947ac367f736889c9525a44d1682 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1dde2a0494ec3314983ff78c0130db1b05efcfadaed52f782e9b9347e3b06a5
|
|
| MD5 |
a0d1cbc5e0e067e007c2998e70882866
|
|
| BLAKE2b-256 |
d704e1b375a020ebf3ce847a119b162a35e50c1d1c9f47778e20d51ed10db53a
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fmt_md_tables-0.1.0-py3-none-any.whl -
Subject digest:
e1dde2a0494ec3314983ff78c0130db1b05efcfadaed52f782e9b9347e3b06a5 - Sigstore transparency entry: 1389650406
- Sigstore integration time:
-
Permalink:
veeso/fmt-md-tables@702cdbb0f1a8947ac367f736889c9525a44d1682 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/veeso
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@702cdbb0f1a8947ac367f736889c9525a44d1682 -
Trigger Event:
push
-
Statement type: