Skip to content

Commit 4e07b58

Browse files
committed
[#96][#34] Update the README in light of changes to the cli
main-sheet-name isn't needed for unflattening, root-list-path is, and defaults have changed.
1 parent 094c045 commit 4e07b58

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Can be converted to/from a spreadsheet like [examples/simple/main.csv](examples/
5656
Using the commands:
5757

5858
```
59-
flatten-tool unflatten -f csv examples/simple --main-sheet-name main --root-id='' -o examples/simple.json
60-
flatten-tool flatten -f csv examples/simple.json --main-sheet-name main --root-list-path main -o examples/simple
59+
flatten-tool unflatten -f csv examples/simple --root-id='' -o examples/simple.json
60+
flatten-tool flatten -f csv examples/simple.json -o examples/simple
6161
```
6262

6363

@@ -123,8 +123,8 @@ These are also the spreadsheets that flatten-tool's `flatten` (JSON to Spreadshe
123123
Commands used to generate this:
124124

125125
```
126-
flatten-tool unflatten -f csv examples/array_multisheet --main-sheet-name main --root-id='' -o examples/array_multisheet.json
127-
flatten-tool flatten -f csv examples/array.json --main-sheet-name main --root-list-path main -o examples/array_multisheet
126+
flatten-tool unflatten -f csv examples/array_multisheet --root-id='' -o examples/array_multisheet.json
127+
flatten-tool flatten -f csv examples/array.json -o examples/array_multisheet
128128
```
129129

130130
However, there are other "shapes" of spreadsheet that can produce the same JSON.
@@ -137,7 +137,7 @@ New columns for each item of the array:
137137
|7|8|9|10|11|12|
138138

139139
```
140-
flatten-tool unflatten -f csv examples/array_pointer --main-sheet-name main --root-id='' -o examples/array.json
140+
flatten-tool unflatten -f csv examples/array_pointer --root-id='' -o examples/array.json
141141
```
142142

143143
Repeated rows:
@@ -151,7 +151,7 @@ Repeated rows:
151151

152152

153153
```
154-
flatten-tool unflatten -f csv examples/array_repeat_rows --main-sheet-name main --root-id='' -o examples/array.json
154+
flatten-tool unflatten -f csv examples/array_repeat_rows --root-id='' -o examples/array.json
155155
```
156156

157157

@@ -367,20 +367,20 @@ And populate this with the package information for your release.
367367

368368
Then, for a populated xlsx template in (in release_populated.xlsx):
369369

370-
flatten-tool unflatten release_populated.xlsx --base-json base.json --input-format xlsx --output-name release.json
370+
flatten-tool unflatten release_populated.xlsx --base-json base.json --input-format xlsx --output-name release.json --root-list-path='releases'
371371

372372
Or for populated CSV files (in the release_populated directory):
373373

374-
flatten-tool unflatten release_populated --base-json base.json --input-format csv --output-name release.json
374+
flatten-tool unflatten release_populated --base-json base.json --input-format csv --output-name release.json --root-list-path='releases'
375375

376376
These produce a release.json file based on the data in the spreadsheets.
377377

378378

379379
### Converting a JSON file to a spreadsheet
380380

381-
flatten-tool flatten input.json --main-sheet-name releases --output-name unflattened
381+
flatten-tool flatten input.json --main-sheet-name releases --output-name flattened --root-list-path='releases'
382382

383-
This will create `unflattened.xlsx` and a `unflattened/` directory of csv files.
383+
This will create `flattened.xlsx` and a `flattened/` directory of csv files.
384384

385385
## Usage for 360Giving
386386

@@ -392,7 +392,7 @@ to the current directory.
392392

393393
flatten-tool create-template --root-id='' --output-format all --output-name 360giving-template --schema 360-giving-schema.json --main-sheet-name grants --rollup --use-titles
394394

395-
flatten-tool unflatten --root-id='' -o out.json -f xlsx --main-sheet-name=grants input.xlsx --schema 360-giving-schema.json --convert-titles
395+
flatten-tool unflatten --root-id='' -o out.json -f xlsx input.xlsx --schema 360-giving-schema.json --convert-titles --root-list-path='grants'
396396

397397

398398
Running the tests

0 commit comments

Comments
 (0)