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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file gdtree-0.0.1.tar.gz.

File metadata

  • Download URL: gdtree-0.0.1.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.5

File hashes

Hashes for gdtree-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2cb34280277bab9b4a8c9bdb97e28c5fec96cb20d89a016d4566785ed6582967
MD5 5056110327489cb1832cfb8f146b36e0
BLAKE2b-256 f04236e83f9737942fc5c5d9ce73c612c49cbe0d5ee4fe3c387980695b3c78a0

See more details on using hashes here.

File details

Details for the file gdtree-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: gdtree-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.5

File hashes

Hashes for gdtree-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98d00d8d2199ec99c621c77b02c0ba02d0d6dd0a0096640216abf2260a433d3a
MD5 8e086f490faaddb722ea03309b0ebdd3
BLAKE2b-256 c028d0350d332bc606fdbb3ba9ac7ab3dff06825db9a6da43e6cf21bc23760c6

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