Closed antifa-ev closed 4 years ago
(if I got your question correctly) you can use the simplified output of wd data
as a squeleton: wd data --simplify Q80 > skeleton.json
It easier to use if pretty printed, which can be done using a tool such as jq or jd:
wd data --simplify Q80 | jq -r > skeleton.json
wd data --simplify Q80 | jd -j > skeleton.json
You can then edit the squeleton to fit your needs and edit the entity: wd edit-item ./skeleton.json
I've had to use wd data --simplify Q80 | jq -r . | cat > skeleton.json
because of https://github.com/stedolan/jq/issues/1110
Weird issue ...
I just published v7.3.0
, which includes a new command based on this idea of preparing a skeleton or template from an existing item: wd generate-template
. Could you give it a try to tell me if that meets your expectations?
How can I dump an existing item as JSON?
I would like to create new items from csv column data while using JSON 'skeleton' files. Have you once tried something?
wd edit-item ./new_item_data.json