You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-13Lines changed: 16 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,21 +3,23 @@ Command line tool for generating markdown tables. It takes in CSV-formatted data
3
3
4
4

5
5
6
-
See also [Crates.io](https://crates.io/crates/mdtable-cli)link.
6
+
See also the [Crates.io](https://crates.io/crates/mdtable-cli)page.
7
7
8
8
# Usage
9
+
The application expects each row of the table as rows in the input, i.e rows separated by newlines. Each element of the row is seperated by a `,` (or another value see flag `-s`). This can either come from a file with a positional argument or from stdin. If from stdin you can signal the end of the table by either `EOF` or by an empty line (i.e hitting enter twice).
10
+
11
+
Here are some example cli usages:
12
+
9
13
```
10
-
mdtable -f table.csv -o mdtable.md
11
-
mdtable -f table.csv > mdtable.md
14
+
mdtable
15
+
mdtable table.csv -o mdtable.md
16
+
mdtable table.csv > mdtable.md
12
17
cat table.csv | mdtable > mdtable.md
13
18
```
14
-
See `Options` for additional flags.
15
-
16
-
The application expects each row of the table as rows in the input, i.e rows separated by newlines. Each element of the row is seperated by a `,` (or another value, see flag `-s`).
17
19
18
-
This can either come from a file with the `-f` flag or from stdin. If from stdin you signal end of table by either `EOF` or by an empty line (i.e hitting enter twice).
20
+
See `Options` for a full description program arguments.
19
21
20
-
See examples of input and output [here](./examples.md).
22
+
For examples of input and corresponding output see [examples.md](./examples.md)
21
23
22
24
# Installation
23
25
If you're a rust programmer (e.g you have `rustc` and `cargo`) simply do:
@@ -36,19 +38,20 @@ cargo build --release
36
38
cp target/release/mdtable /usr/local/bin/
37
39
```
38
40
39
-
40
41
# Options
41
42
```
42
43
USAGE:
43
-
mdtable [FLAGS] [OPTIONS]
44
+
mdtable [FLAGS] [OPTIONS] [FILE]
44
45
45
46
FLAGS:
46
47
-h, --help Prints help information
47
48
-m, --minimize Minimizes table output
48
49
-V, --version Prints version information
49
50
50
51
OPTIONS:
51
-
-f, --file <file> Reads table values from this if given, stdin otherwise.
52
-
-o, --out <outfile> Prints output to this if given, stdout otherwise.
53
-
-s, --separator <separator> String that separates values. [default: ,]
52
+
-o, --out <FILE> Prints output to this. [default: stdout]
0 commit comments