Git Product home page Git Product logo

plant's Introduction

plant

A command line utility for visualization of hierarchical data in tree form, written in python and thus portable to pretty much anything.

The program "plant" will read in any number of lines, and arrange them internally in an n-ary tree, where each line is broken up into "identifiers" and "seperators", with the "seperators" specifiable via the argument "-r REGEX".

After the program receives the end-of-file signal or runs over the configured threshhold of objects in the tree, it will start printing the tree in a visually pleasing and configurable manner.

The input should be in depth-first traversal manner(e.g. child items should come before siblings), which is automatically done by pretty much any recursively working utility. Lexically sorting the input lines is not necessary, but will accomplish the depth-first traversal requirement for any input.

The difference of this program compared to the canonical utility "tree" is that it

  • works on any dataset and is not limited to file paths
  • works on piped input and can thus display filtered and/or modified input
  • has a lot of visual options, including indent length, line style, and folding

installation

Just copy the file to your computer. If you have Python 3 installed it should work out of the box. If you want to be able to run it as any command line utility, copy it to a location in your $PATH. Packages for Arch Linux are avaliable via the AUR, packages for different distributions are to be done.

plant's People

Contributors

qbe avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.