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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.