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 details)

Uploaded Source

File details

Details for the file baum-0.1.2.tar.gz.

File metadata

  • Download URL: baum-0.1.2.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for baum-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6e3fdb069aec8841335f44b8bec90378315ad26d9838c806e03a02653b3a038f
MD5 edd12713d887c6ce48440c21bf28ec4d
BLAKE2b-256 c7100215d6dcfa9fd56f34a3684a4c6ec8f6417ebccbd75764820c95664f9f65

See more details on using hashes here.

Supported by

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