Removed header output relabeling and added column filtering with label handling.
All checks were successful
build / build (push) Successful in 8s

This commit is contained in:
2026-03-07 18:48:29 +01:00
parent f5877d2ccd
commit 281b0c13aa
9 changed files with 160 additions and 80 deletions

View File

@@ -6,16 +6,17 @@ The `sk-tools` package provides generic CLI utilities not tied to a specific clo
**Command name:** `table`
**Usage:** `sk-tools table [--from|-F <json|csv|tsv>] [--header|-H <definition|auto|a|original|o>] [global options]`
**Usage:** `sk-tools table [--from|-F <json|csv|tsv>] [--columns|-C <definition>] [global options]`
**Options:**
- `--from`, `-F` <json|csv|tsv> - Input format read from stdin. Default: `json`.
- `--header`, `-H` <definition|auto|a|original|o> - Header definition. Possible values:
- `col1, col2, ...` - Column names separated by comma. The number of columns should match table columns.
- `key1: Col1, key2: Col2, ...` - Property-to-column mapping.
- `auto`, `a` - Header generated automatically from result keys.
- `original`, `o` - Header based on original table shape.
- `--columns`, `-C` <definition> - Column definition. Possible values:
- `col1` - Select column (case-insensitive match), keep raw header label.
- `col1:` - Select column (case-insensitive match), use auto-generated header label.
- `col1: Label 1` - Select column (case-insensitive match), use custom header label.
- Prefix token with `=` for exact column-name match: `=col1`, `=col1:`, `=col1:Label`.
- Tokens are comma-separated and rendered in the specified order.
**Global options:**