csv2md/README.md

39 lines
1.4 KiB
Markdown
Raw Normal View History

2022-02-16 09:49:22 +00:00
# csv2md
Stupidly simple tool to convert csv-file to [markdown](https://spec-md.com/) table.
Outputs result in stdout.
2022-02-17 03:41:04 +00:00
## Usage
2022-02-16 09:49:22 +00:00
```shell
2022-02-17 05:12:11 +00:00
csv2md (-h|-help|--help|help) # to get this help
csv2md example.csv # convert data from file and write result in stdout
csv2md < example.csv # convert data from stdin and write result in stdout
cat example.csv | csv2md # convert data from stdin and write result in stdout
csv2md example.csv > example.md # convert data from file and write result in new file
csv2md example.csv | less # convert data from file and write result in stdout using pager
csv2md # paste or type data to stdin by hands
# press Ctrl+D to view result in stdout
csv2md > example.md # paste or type data to stdin by hands
# press Ctrl+D to write result in new file
2022-02-16 09:49:22 +00:00
...anything is possible with redirection and piping
```
2022-02-17 03:41:04 +00:00
> **IMPORTANT:**
2022-02-17 05:12:11 +00:00
> * input must be valid csv
2022-02-17 03:41:04 +00:00
> * whitespaces allowed only between double-quotes
2022-02-16 09:49:22 +00:00
Examples can be found here: https://people.sc.fsu.edu/~jburkardt/data/csv/csv.html
2022-02-17 03:41:04 +00:00
## Compilation
1) [Install go](https://go.dev/learn/).
2022-02-17 05:12:11 +00:00
2) Download this repo via zip or `git clone`.
2022-02-17 03:41:04 +00:00
3) Run `make help` to get help or `go run . <csv_path>` to build and run temporary binary.
## License
[MIT](LICENSE)