Bidirectional conversion between markdown tables and CSV.
# Output to stdout
uv run md_table_to_csv.py input.md
# Output to a file
uv run md_table_to_csv.py input.md -o output.csvInput must be a single pipe-delimited markdown table:
| Name | Age | City |
|-------|-----|------|
| Alice | 30 | NYC |
| Bob | 25 | LA |Output:
Name,Age,City
Alice,30,NYC
Bob,25,LA
# Output to stdout
uv run csv_to_md_table.py input.csv
# Output to a file
uv run csv_to_md_table.py input.csv -o output.mdInput must be a standard CSV file where the first row is the header:
Name,Age,City
Alice,30,NYC
Bob,25,LAOutput:
| Name | Age | City |
| ----- | --- | ---- |
| Alice | 30 | NYC |
| Bob | 25 | LA |Both scripts write to stdout by default. Use -o <file> to write to a file instead.