https://github.com/jamiemason/treeify
Format an indented text file in the style of the Linux tree command
https://github.com/jamiemason/treeify
Last synced: 3 months ago
JSON representation
Format an indented text file in the style of the Linux tree command
- Host: GitHub
- URL: https://github.com/jamiemason/treeify
- Owner: JamieMason
- License: mit
- Created: 2017-03-24T16:38:30.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-30T22:01:57.000Z (about 8 years ago)
- Last Synced: 2024-10-18T19:34:21.775Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# treeify
Format an indented text file in the style of the [Linux `tree` command](http://www.computerhope.com/unix/tree.htm).
## Installation
```
npm install -g treeify
```## Usage
```
cat ./file.txt | treeify
```## Example
If file.txt contains the following;
```
Marsha
Judith
Loren
Hedwig
Tamela
Judie
Gustavo
Holley
Devon
Brook
Dovie
Marguerite
Jennell
Lia
Herman
Oneida
Caridad
Fran
Brendon
Giovanni
Coreen
Fritz
Carita
Almeda
Kip
Jazmine
Lonna
Porsha
```then `treeify` would output;
```
├── Marsha
├── Judith
├── Loren
| └── Hedwig
├── Tamela
| └── Judie
| ├── Gustavo
| ├── Holley
| | ├── Devon
| | ├── Brook
| | | └── Dovie
| | | ├── Marguerite
| | | └── Jennell
| | | └── Lia
| | | └── Herman
| | ├── Oneida
| | ├── Caridad
| | └── Fran
| | └── Brendon
| | ├── Giovanni
| | └── Coreen
| | └── Fritz
| | └── Carita
| ├── Almeda
| ├── Kip
| └── Jazmine
└── Lonna
└── Porsha
```