fs-make
fs-make copied to clipboard
Make a folder structure from its description
Make your folder structure from its description with fs-make (folder structure make)
!
Syntax
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:
Getting Started
Dependencies
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:
macOS
Make sure that you have Homebrew installed.
Windows
Install the Windows Subsystem for Linux or Cygwin and make sure that you have APT installed.
Linux
Make sure that you have APT installed.
Building
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
Try it out
- 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>
Code of Conduct
Please refer to the code of conduct for the rules for interacting with this project.
Contributing
Please go through the contributing documentation to contribute to this project.
License
This project is licensed under the MIT License.