Skip to main content

Generates a pretty-printed directory tree

Project description

gdtree

gdtree is a directory tree generator built with Python.

Description

gdtree provides easy directory tree generation. This command-line tool is inspired by the classic UNIX tree utility.

Suppose that a given directory has the folder structure below

top_folder
|-- another_folder
|   |-- link_to_file_2
|--lower_folder
|   |-- secrets.py
|-- file_1.py
|-- file_2.txt
|-- file_3.json
|-- special_script.sh

where

  • link_to_file_2 is a symbolic link
  • special_script.sh has execute privileges (for the current user)

gdtree will produce the following output when called on this directory

A picture of gdtree output

The directory is pretty-printed using unicode box characters, and is colorized based on the file type.

Usage

gdtree can be easily installed using pip

pip install gdtree

To generate a directory tree for the current directory, enter the command

gdtree .

An absolute path can be used in place of the relative path to generate a directory tree for any directory

Options

gdtree comes with options to provide information and customize some features of the tree generation:

  • -h, --help - Prints a help message containing usage details
  • -n, --dncolorize - Disables output colorization
  • -f, --fancy - Prints tree using fancy box characters (uses ╠══ instead of ├──)
  • -r, --reverse - Prints tree in reverse alphabetical order

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

gdtree-0.0.1.tar.gz (13.5 kB view hashes)

Uploaded Source

Built Distribution

gdtree-0.0.1-py3-none-any.whl (10.5 kB view hashes)

Uploaded Python 3

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