We want to add dir2json (somehow), so it's possible to pack directories into JSON.
Currently, we have only json2dir. It accepts no arguments, very simple.
Besides dir2json, I have a couple of features in mind:
- List JSON archives in various ways:
- Something like
ls is currently possible by passing the archive to jq keys[] -r
- Something like
find . is currently possible by passing the archive to jq 'walk(if type != "object" then null end) | paths | join("/")' --raw-output (or --raw-output0) (thanks @magistau)
I'm thinking of the following CLI:
# Usage.
jsondir
# Basic functionality.
jsondir to json
jsondir to dir
# Listing.
jsondir list
jsondir find
# If we decide to support YAML.
jsondir to yaml
jsondir to dir from yaml
jsondir list yaml
jsondir find yaml
Other options
Unclear how to add subcommands
jsondir json create
jsondir dir create
jsondir json list <path>
jsondir json paths <path>
Too verbose?
json2dir
json2dir unpack # (Explicit.)
json2dir pack
It's confusing how json2dir can actually create JSON.
We want to add
dir2json(somehow), so it's possible to pack directories into JSON.Currently, we have only
json2dir. It accepts no arguments, very simple.Besides
dir2json, I have a couple of features in mind:lsis currently possible by passing the archive tojq keys[] -rfind .is currently possible by passing the archive tojq 'walk(if type != "object" then null end) | paths | join("/")' --raw-output(or--raw-output0) (thanks @magistau)I'm thinking of the following CLI:
Other options
Unclear how to add subcommands
Too verbose?
It's confusing how
json2dircan actually create JSON.