#convert #string #tree #flat-tree

bin+lib print-flat-tree

Convert a flat-tree to a string

5 stable releases

Uses old Rust 2015

1.1.3 Jul 25, 2018
1.1.2 Apr 2, 2018
1.1.1 Feb 23, 2018
1.0.0 Feb 23, 2018

#324 in #tree

MIT/Apache

12KB
114 lines

print-flat-tree

crates.io version build status downloads docs.rs docs

Converts a flat-tree to a string. Adapted from mafintosh/print-flat-tree.

Installation

$ cargo add print-flat-tree

Usage

print-flat-tree
Converts a flat-tree to a string

USAGE:
    print-flat-tree [tree]...

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

ARGS:
    <tree>...    For example '0 1 2 3 7 8 9 10'

Output

print-flat-tree 0 1 2 3 7 8 9 10 11 12 13 14

  0──┐
     1──┐
  2──┘  │
        3──┐
           │
           │
           │
           7
  8──┐     │
     9──┐  │
 10──┘  │  │
       11──┘
 12──┐  │
    13──┘
 14──┘

License

MIT OR Apache-2.0

Dependencies

~4MB
~78K SLoC