Skip to main content

A Python package to generate ASCII tree representation of directory structures

Project description

PyGenTree

PyPI version License Python versions

A Python package to generate ASCII tree representation of directory structures.

Requirements

  • Python 3.6 or higher

Installation

pip install pygentree

Usage

# Basic usage (current directory)
pygentree

# Specify a directory
pygentree /path/to/directory

# Limit depth level
pygentree -l 2

# Sort files and folders
pygentree -s asc   # ascending order
pygentree -s desc  # descending order
pygentree -s standard  # default: folders first, then files

# Show only directories
pygentree -d

# Ignore hidden files and directories, e.g. .git, .env, etc.
pygentree --ignore-hidden

# Exclude specific files or directories (comma-separated)
pygentree -e "node_modules,venv,dist"

# Save output to file
pygentree -o tree.txt

# Show version
pygentree -v

# Show help
pygentree -h

Features

  • Generate ASCII tree representation of directory structures
  • Customize maximum depth level
  • Multiple sorting options
  • Option to show only directories
  • Option to ignore hidden files and directories
  • Exclude specific files and directories
  • Save output to file
  • Handle permission errors gracefully
  • Cross-platform compatibility

Supported Python Versions

  • Python 3.6
  • Python 3.7
  • Python 3.8
  • Python 3.9
  • Python 3.10
  • Python 3.11
  • Python 3.12

License

MIT License

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

pygentree-1.0.4.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

pygentree-1.0.4-py2.py3-none-any.whl (7.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pygentree-1.0.4.tar.gz.

File metadata

  • Download URL: pygentree-1.0.4.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for pygentree-1.0.4.tar.gz
Algorithm Hash digest
SHA256 b641a8a075eaef2c353102f0707575ca620356165726000d884a40216708266d
MD5 163677577f70b80c7f8d6ec2435efab3
BLAKE2b-256 97578e081d9d5676937509c059bd69735ec5bb23982006768a8bec9e297621a5

See more details on using hashes here.

File details

Details for the file pygentree-1.0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: pygentree-1.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for pygentree-1.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 381442c30e253d185f10a05e87305c1e9b42ca1caf8100eea28c7abe1cd1d43f
MD5 103b73b729bf99a8a9a7403ac9e5ffde
BLAKE2b-256 4f327a35bf049f791d697c412b6329261a6706979bc78a29ec9e3c899212ee2f

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