table-png
A command-line tool that renders Markdown, CSV or JSON tables as PNG images for places that do not display tables.
Install
$ pipx install table-png
$ uv tool install table-png
Python 3.9 or newer; Pillow is the only runtime dependency.
Quick start
$ table-png docs/demo/status.md --out /tmp/table-status.png --title "Service status"
/private/tmp/table-status.png
$ table-png docs/demo/status.csv --out /tmp/table-status-csv.png --title "Service status"
/private/tmp/table-status-csv.png
$ table-png docs/demo/status.json --out /tmp/table-status-json.png --title "Service status" --theme dark
/private/tmp/table-status-json.png
status.md can contain a Markdown pipe table. The command also reads CSV and JSON, or a table piped to table-png - --out status.png. --theme dark draws the same input for a dark background.
| Service | State | Response |
|---|---|---:|
| API | ✅ ready | 120 ms |
| Queue | ⚠️ delayed | 3.2 s |
| Mailer | ❌ stopped | — |
Why
Some chat, notification and image-only fields display Markdown pipes as text. table-png draws the cells into an image. It searches for CJK-capable text and emoji fonts on macOS, Linux and Windows; when a CJK font is missing, it reports the font option to use.
Cells wrap to fit the image. Tables longer than --rows-per-page (40 by default) produce numbered PNG pages. Width is clamped to 720–1600 pixels.
Options
| Option | Default | Purpose |
|---|---|---|
INPUT |
- (stdin) |
File path or standard input |
-o, --out PATH |
required | Output image path |
-f, --format |
auto |
auto, markdown, csv or json |
--title TEXT |
none | Text above the table |
-w, --width PX |
1080 |
Image width, clamped to 720–1600 |
--rows-per-page N |
40 |
Rows in each image |
--theme |
light |
light or dark |
--json |
off | Print output path and image dimensions as JSON |
Limits
Pillow and a suitable local font are required. This project has been exercised on macOS, Ubuntu 24.04 and Windows 11. On Windows, flag emoji render as country letters and family emoji sequences render as separate faces.
License
MIT.
Tables with too many columns for the selected width are rejected; increase --width or reduce the columns.
Metadata
Release files for table-png 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| table_png-0.1.3.tar.gz | 20.1 kB | Without provenance | Details for table_png-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| table_png-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for table_png-0.1.3-py3-none-any.whl |
Total release size: 40.7 kB
Release files / table_png-0.1.3.tar.gz
| Download URL | table_png-0.1.3.tar.gz |
|---|---|
| Size | 20.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a8767a0fc13d8ebc7dc2bcbc9550b63b3b7864dd71c048fe047cd767ad1ed684
|
|
BLAKE2b-256 checksum How to use checksums |
304f82176e25ed6940fd34f9808a5f67989596dfb3b7c353e53f5a4261ab5fbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.8
|
Release files / table_png-0.1.3-py3-none-any.whl
| Download URL | table_png-0.1.3-py3-none-any.whl |
|---|---|
| Size | 20.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84164168bbd995c7c71e52e4bf81c9263fcb2914092bc7ea296d5c59aceb61f7
|
|
BLAKE2b-256 checksum How to use checksums |
08415fb3858072f2ab1e62ba977f2cf6601dd8a812ef37bd0f32168eccda257e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.8
|
Security for table-png 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.