Skip to content

feat: add TSV input and output format support#120

Merged
vmvarela merged 2 commits intomasterfrom
issue-97/tsv-input-format
May 1, 2026
Merged

feat: add TSV input and output format support#120
vmvarela merged 2 commits intomasterfrom
issue-97/tsv-input-format

Conversation

@vmvarela
Copy link
Copy Markdown
Owner

@vmvarela vmvarela commented May 1, 2026

Summary

  • Adds tsv to InputFormat and OutputFormat enums
  • --input-format tsv / -I tsv reads tab-separated input via the existing CSV reader (trivial: tab delimiter override)
  • --output-format tsv / -O tsv writes tab-separated output using the same delimited-text path as CSV
  • --header is now allowed with --output-format tsv (in addition to --csv)
  • All existing flags (--tsv, --json, etc.) unchanged

Acceptance Criteria

  • --input-format tsv reads tab-separated input correctly
  • Column names are read from the first row (same as CSV behavior)
  • Rows with embedded tabs (quoted) are handled correctly — RFC 4180 quoting with tab as delimiter
  • Existing --tsv output flag is unchanged and still works
  • --output-format tsv produces tab-separated output

Closes #97

Add `tsv` to InputFormat and OutputFormat enums so users can use
`--input-format tsv` / `-I tsv` and `--output-format tsv` / `-O tsv`.

TSV input reuses the CSV reader with tab as delimiter. TSV output uses
the same delimited-text path as CSV but with tab as the separator.
`--header` is now also allowed with `--output-format tsv`.

Closes #97
@vmvarela vmvarela added this to the Sprint 6 milestone May 1, 2026
@vmvarela vmvarela added type:feature New functionality priority:medium Should be done soon size:xs Trivial — less than 1 hour labels May 1, 2026
@github-actions github-actions Bot removed the type:feature New functionality label May 1, 2026
- Add 9 integration tests (62–70) covering --input-format tsv,
  --output-format tsv, -I/-O short flags, TSV roundtrip, CSV→TSV,
  --header with TSV output, --columns with TSV, and quoted-tab fields
- Fix help text: --header now reads '(CSV/TSV output only)'
- Fix doc comment and error message: 'non-CSV' → 'non-CSV/TSV'
@vmvarela vmvarela merged commit 171129f into master May 1, 2026
4 checks passed
@vmvarela vmvarela deleted the issue-97/tsv-input-format branch May 1, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:medium Should be done soon size:xs Trivial — less than 1 hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TSV input format support

1 participant