It is a CLI adaptation of the Structurer App.
The script uses some tools:
- curl
- jq
- unzip (optional)
First you need to create a proper configuration file when you may create some aliases:
$ mkdir -p ~/.structurer
$ cat > ~/.structurer/structurer.json << EOF
{
"aliases": [
{
"name": "MIT",
"type": "url",
"value": "https://raw.githubusercontent.com/kevinlebrun/documentalist/master/LICENSE"
},
{
"name": "jquery",
"type": "file",
"value": "path/to/local/jquery.js"
}
]
}
EOF
Note: If you map an archive (.tar.gz
or .zip
) to a directory, the archive will be extracted inside the directory.
Then you can generate any tries with structurer
:
$ cat > structure << EOF
file.txt
path/file.txt
LICENSE:MIT
EOF
$ cat structure | structurer - dest
$ tree dest
dest
├── LICENSE
├── file.txt
└── path
└── file.txt
1 directory, 3 files
- Write a proper documentation
- Write complete test suite
- Support
-h