Directory Structure ASCII Generator
A simple command-line tool that generates an ASCII representation of a directory structure.
Installation
To install the Directory Structure ASCII Generator, you need to have Go installed on your system. Then, you can use the following command:
go install github.com/pablowolf96/ascii-tree@latest
Usage
To use the Directory Structure ASCII Generator, run the following command:
ascii-tree [flags] <directory>
Flags
-output string
: Specifies the name of the output file. If not provided, it defaults to output.txt
.
Examples
Generate the ASCII structure for a directory and save it to the default output.txt file:
ascii-tree /path/to/directory
Generate the ASCII structure for a directory and save it to a specific output file:
ascii-tree -output=mystructure.txt /path/to/directory
Output
The ASCII representation of the directory structure will be saved to the specified output file (default: output.txt
). The output will look similar to the following:
root
├── home
│ ├── user
│ │ ├── documents
│ │ │ ├── work
│ │ │ │ ├── project1
│ │ │ │ └── project2
│ │ │ └── personal
│ │ ├── downloads
│ │ └── pictures
│ │ ├── vacations
│ │ └── family
│ └── guest
│ ├── downloads
│ └── documents
├── var
│ ├── log
│ └── www
│ ├── html
│ │ ├── index.html
│ │ └── about.html
│ └── cgi-bin
├── etc
│ ├── nginx
│ └── systemd
└── usr
├── bin
└── lib
Contributing
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.
License
This project is licensed under the MIT License.