File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments