Skip to content

Commit 87666ad

Browse files
committed
Add README with a basic usage section
1 parent 270ab1f commit 87666ad

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Markdown Table Generator
2+
3+
Generate markdown tables from a JSON definition for publication on [locatarr.github.io](https://locatar.github.io).
4+
5+
## Usage
6+
7+
### JSON file format
8+
9+
```jsonc
10+
{
11+
"applications": [
12+
{
13+
"name": "AppName",
14+
"description": "App Description",
15+
"github_slug": "github/link", // github_slug is an optional field
16+
"subreddit": "r/subreddit" // subreddit is an optional field
17+
}
18+
]
19+
}
20+
```
21+
22+
### Generate from a file
23+
24+
```bash
25+
$ markdown-table-generator myfile.json
26+
| **Application** | **Description** | **Github** | **Reddit** |
27+
|-|-|-|-|
28+
| AppName | App Description | GitHub Link | Subreddit |
29+
...
30+
```
31+
32+
### Generate from standard input
33+
34+
```bash
35+
$ cat myfile.json | markdown-table-generator -
36+
| **Application** | **Description** | **Github** | **Reddit** |
37+
|-|-|-|-|
38+
| AppName | App Description | GitHub Link | Subreddit |
39+
...
40+
```
41+
42+
OR
43+
44+
```bash
45+
$ cat myfile.json | markdown-table-generator
46+
| **Application** | **Description** | **Github** | **Reddit** |
47+
|-|-|-|-|
48+
| AppName | App Description | GitHub Link | Subreddit |
49+
...
50+
```

0 commit comments

Comments
 (0)