Skip to main content

CLI tool for generating Unicode/ASCII trees

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

baum-0.1.2.tar.gz (5.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page