Make your folder structure from its description with fs-make (folder structure make)
!
Note that this is not JSON but a similar data-format. Here's what the Abstract Syntax Tree looks like.
-
Files are represented by the file name placed between a pair of double quotes (
"
):"file-name"
-
Directories are represented by the directory name in double quotes (
"
) followed by a colon (:
) and a comma-separated (,
) set of file and directory representations between a pair of braces ({}
):"src": { "main.cpp", "CMakeLists.txt", "build": { "Makefile", "boink" }, "includes": { } }
When a directory contains only a single entity, the braces aren't necessary:
"i have one file": "one file"
-
The input file content can be like any of these:
- a file
"just a file"
- a directory
"lonely directory": { "stuff" }
- an unnamed set of entities like this:
{}
- a file
Here's what the Abstract Syntax Tree looks like:
The dependencies are:
gcc
g++
flex
bison
tree
No manual installation is required. The configure
script installs the dependencies using a package manager. If you are using:
Make sure that you have Homebrew installed.
Install the Windows Subsystem for Linux or Cygwin and make sure that you have APT installed.
Make sure that you have APT installed.
Clone the repo with:
$ git clone https://github.com/RaisinTen/fs-make.git
$ cd fs-make
Update your package lists and build fs-make
using:
$ ./configure
$ make
$ make install
- Create a file describing the structure of your folder.
- Use
fs-make
to build the script:$ fs-make <description-file-name> <script-file-name>
- Run the script to generate the folder structure:
$ . <script-file-name>
- To view it:
$ tree -a <directory-name>
Please refer to the code of conduct for the rules for interacting with this project.
Please go through the contributing documentation to contribute to this project.
This project is licensed under the MIT License.