1.0.0 • Published 2 years ago

contree v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

contree

File tree text generation utility

Usage

The GenerateTreeText function takes a title and tree. The title is a string, while the tree is an array containing either strings (entries) or another array (sub tree).

Example

In this example, the tree is titled "Test Tree"

GenerateTreeText("Test Tree", [
    "start",
    "a",
    ["b", "c", "d"],
    "e",
    "f",
    ["g", "h", "i", ["j", "k", "l"]],
    "end",
]);
šŸ—„ļø  Test Tree
ā”œā”€ā”€ start
ā”œā”€ā”€ a
ā”œā”€ā”€ šŸ“‚ b
│    ā”œā”€ā”€ c
│    └── d
ā”œā”€ā”€ e
ā”œā”€ā”€ f
ā”œā”€ā”€ šŸ“‚ g
│    ā”œā”€ā”€ h
│    ā”œā”€ā”€ i
│    └── šŸ“‚ j
│        ā”œā”€ā”€ k
│        └── l
└── end