Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raisinten/fs-make
Make a folder structure from its description
https://github.com/raisinten/fs-make
bison flex grammar lex parser productivity project yacc
Last synced: about 3 hours ago
JSON representation
Make a folder structure from its description
- Host: GitHub
- URL: https://github.com/raisinten/fs-make
- Owner: RaisinTen
- License: mit
- Created: 2020-05-26T07:22:15.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-16T07:17:31.000Z (6 months ago)
- Last Synced: 2024-05-16T08:35:59.153Z (6 months ago)
- Topics: bison, flex, grammar, lex, parser, productivity, project, yacc
- Language: C++
- Homepage:
- Size: 1.02 MB
- Stars: 15
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
---
Make your folder structure from its description with **`fs-make (folder structure make)`**!
![example](https://github.com/RaisinTen/fs-make/raw/master/fs-make-demo.png)
## 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:
```
{}
```
Here's what the Abstract Syntax Tree looks like:![grammar graph](https://github.com/RaisinTen/fs-make/raw/master/graphviz.svg)
## 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](https://brew.sh/) installed.
#### Windows
Install the [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10) or [Cygwin](https://cygwin.com/install.html) and make sure that you have [APT](https://salsa.debian.org/apt-team/apt) installed.
#### Linux
Make sure that you have [APT](https://salsa.debian.org/apt-team/apt) installed.
### Building
Clone the repo with:
```sh
$ git clone https://github.com/RaisinTen/fs-make.git
$ cd fs-make
```Update your package lists and build **`fs-make`** using:
```sh
$ ./configure
$ make
$ make install
```## Try it out
1. Create a file describing the structure of your folder.
2. Use `fs-make` to build the script:
```sh
$ fs-make
```
3. Run the script to generate the folder structure:
```sh
$ .
```
4. To view it:
```sh
$ tree -a
```## Code of Conduct
Please refer to the [code of conduct](CODE_OF_CONDUCT.md) for the rules for interacting with this project.
## Contributing
Please go through the [contributing](CONTRIBUTING.md) documentation to contribute to this project.
## License
This project is licensed under the [MIT License](LICENSE).