A simple utility to print directory structures in a tree-like format
Project description
Tree Printer
A simple Python library that helps developers generate and share their project directory structures. Perfect for documenting project layouts in GitHub READMEs, technical documentation, or when explaining project organization to other developers.
Why Tree Printer?
When sharing your project on platforms like GitHub or discussing code organization with other developers, it's important to show your project's folder structure. However, manually typing out directory structures is:
- Time-consuming
- Error-prone
- Hard to maintain as your project grows
Tree Printer solves this by automatically generating a clean, consistent directory structure that you can instantly copy into your documentation.
Example
Run:
dir-tree-printer /path/to/your/project
Get:
└── my-project
├── src
│ └── components
│ ├── Header.js
│ └── Footer.js
├── tests
├── README.md
└── package.json
Now you can directly paste this into your README, documentation, or anywhere else you need to show your project structure!
Installation
pip install dir-tree-printer
Usage
Command Line
# Basic usage
dir-tree-printer /path/to/directory
# Exclude specific folders
dir-tree-printer /path/to/directory --exclude node_modules .git
Python API
from tree_printer import TreePrinter
printer = TreePrinter()
printer.print_structure("./my_directory")
License
This project is licensed under the MIT License - see the LICENSE file for details.
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.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dir_tree_printer-0.1.1.tar.gz.
File metadata
- Download URL: dir_tree_printer-0.1.1.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92bcd85216e61f731a3f2c3cae0198cd6598dc53814f3e207441588ced427421
|
|
| MD5 |
d57968de1fa9781115c999a035507b71
|
|
| BLAKE2b-256 |
e89b3706392aba986ad28533fcca4d91c5958ff987138a2b100e4aa518b0a6f9
|
File details
Details for the file dir_tree_printer-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dir_tree_printer-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ea85158f5a5d76ad9b92058fa6dda086d53f0ed0cba282ee799cb6e338e1b6d
|
|
| MD5 |
3bdb762464ef723a8aeb06608a844ef5
|
|
| BLAKE2b-256 |
a956f13df7fb442445a443f9aa86c1878670b61c04a5006865cd5b94353ba588
|