Skip to content

fishberg/csv-md-table-convert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

csv-md-table-convert

Bidirectional conversion between markdown tables and CSV.

md → 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.csv

Input 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

CSV → md

# 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.md

Input must be a standard CSV file where the first row is the header:

Name,Age,City
Alice,30,NYC
Bob,25,LA

Output:

| 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages