ruut

converts simple nested parens structure into tree-like output

ruut is a great tool by Hazel Bachrach for making diagrams that resemble the output of the tree command. For example:

❯ ruut 'Parent (Child 1, Child 2 (Grandchild 1, Grandchild 2), Child 3)'
Parent
├── Child 1
├── Child 2
│   ├── Grandchild 1
│   └── Grandchild 2
└── Child 3

I use this so infrequently that I can never remember what it’s called. This doc gets it into clu, which helps me to find it again when I need it.

Usage

ruut 0.7.0
Harry Bachrach <harrison.bachrach@gmail.com>
Make easy-to-type and easy-to-grab folder structures easy to read

USAGE:
    ruut [FLAGS] [OPTIONS] [serialized_tree]

FLAGS:
    -h, --help                Prints help information
    -r, --raise-on-missing    Raise an error if a property used in the template is missing (only applies to `jsonprop`
                              format)
    -V, --version             Prints version information

OPTIONS:
    -c, --children <children>    The property containing the children of the given node (only applies to `jsonprop`
                                 format) [default: children]
    -f, --format <format>         [default: parens]  [possible values: parens, json, jsonprop]
    -t, --template <template>    Can be used to customize name of each node, deriving from properties (e.g. "this boy's
                                 id: {id}" will print `this boy's id = 3` if the id of the node is 3; only applies to
                                 `jsonprop` format) [default: {name}]

ARGS:
    <serialized_tree>    

Metadata:

Tags:

  • 3rd_party