Skip to content

Commit c58259b

Browse files
committed
Updated README.md
1 parent a39192c commit c58259b

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

generate-pdf/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Introduction
2+
3+
A command line tool that takes a `template` and a `csv` file for `pdf` file generation.
4+
5+
# Implementation
6+
7+
- `csv` file
8+
9+
```csv
10+
name;desc;lat;lon
11+
Bus station;Bus station;10.0;20.0
12+
Rail station;Rail station;10.2;20.2
13+
```
14+
15+
- `template` file
16+
17+
```json
18+
{
19+
"content": [
20+
"{{{ name }}}",
21+
"{{{ desc }}}"
22+
]
23+
}
24+
```
25+
26+
- **Usage**
27+
28+
```sh
29+
yarn build
30+
31+
yarn start --csv=test.csv --template=template.json
32+
```
33+
34+
# References
35+
36+
- [yargs](https://github.com/yargs/yargs) to read command line inputs
37+
- [papaparse](https://github.com/mholt/PapaParse) to to parse `csv`
38+
- [mustache](https://github.com/janl/mustache.js) to render `template`
39+
- [pdfmake](https://github.com/bpampuch/pdfmake) to generate `pdf`
40+

0 commit comments

Comments
 (0)