Skip to content

Commit c1bfe0e

Browse files
committed
docs: add info on --template and expand on --children options
1 parent 6cc085d commit c1bfe0e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,19 @@ names are ignored:
182182

183183
By default, this format looks for the properties `name` for what to print for
184184
each item and `children` for what items are immediate descendants. To change
185-
this, you can use the `--name` and `--children` options, respectively.
185+
this, you can use the `--template` and `--children` options, respectively.
186+
187+
#### `--template <template_str>`
188+
189+
This option allows you to grab any properties from each JSON node using a simple
190+
curly brace template syntax. E.g. for a node with the properties `id` = `3`,
191+
`type` = `"Folder"`, you could write a template string of `Id: {id}, Type:
192+
{type}` which would result in `Id: 3, Type: Folder`.
193+
194+
#### `--children <children_prop>`
195+
196+
This option allows you to specify the name of the property that contains the
197+
children JSON nodes, which is `children` by default.
186198

187199
## Versioning
188200

0 commit comments

Comments
 (0)