Skip to content
/ baum Public

CLI tool for rendering ASCII/Unicode trees from parenthesized expressions

License

Notifications You must be signed in to change notification settings

fwcd/baum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Baum

PyPI Typecheck Test

A small Python script that generates a Unicode or ASCII tree from a parenthesized expression.

Examples

baum "this [is [an, example, tree], with [a, bunch, of, nodes]]"
this
├─ is
│  ├─ an
│  ├─ example
│  └─ tree
└─ with
   ├─ a
   ├─ bunch
   ├─ of
   └─ nodes

In addition to the default style, which is unicode, a number of other styles are supported, which can be set via the --style flag, e.g.:

baum --style ascii "this [is [an, example, tree], with [a, bunch, of, nodes]]"
this
+- is
|  +- an
|  +- example
|  \- tree
\- with
   +- a
   +- bunch
   +- of
   \- nodes

Or even emoji for visualizing file trees:

baum --style emoji "this [is [an [], example [], tree []], with [a, bunch, of, nodes]]"
📁 this
  📁 is
    📁 an
    📁 example
    📁 tree
  📁 with
    📄 a
    📄 bunch
    📄 of
    📄 nodes

Run baum --help for a complete overview.

About

CLI tool for rendering ASCII/Unicode trees from parenthesized expressions

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages