Project File Tree (prft)
prft is a Python library designed to easily generate and display the file structure of a project, with support for .gitignore patterns. It allows you to quickly visualize the organization of files and directories within a specified project directory.
Features
- Generates a clear and visual representation of your project’s file structure.
- Supports .gitignore and other ignore files, so you only see files relevant to the project.
- Allows hiding hidden files (dotfiles) for a cleaner output.
- Easy to use for ChatGPT.
Installation
Install prft via pip:
pip install prft
Usage
Use prft in the terminal to display a project’s file structure.
Basic Command
prft path_to_project
You can also use . to specify the current directory if you are in the project directory:
prft .
Options
- --no-ignore: Show all files, including those listed in .gitignore.
- --no-dot: Include hidden files (dotfiles) in the output.
- --prefix "some prefix": Use your own prefix (" " by default)
Example:
prft path_to_project --no-ignore --no-dot
Example Output
Running prft in a sample project directory might produce output like this:
project/
├── src/
│ ├── main.py
│ ├── utils.py
│ └── config/
│ └── settings.py
├── .gitignore
├── README.md
└── requirements.txt
This output shows a hierarchical view of the files and directories in path_to_project, ignoring files specified in .gitignore (unless --no-ignore is used).
License
This project is licensed under the MIT License.
Author
Created by trum-ok :p
Metadata
Release files for prft 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| prft-1.3.0.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prft-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 kB
Release files / prft-1.3.0.tar.gz
| Download URL | prft-1.3.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee958d362e0202e660944b000b8b801f5812f5e1ddbd9f057a9bbb7baa5b5351
|
|
BLAKE2b-256 checksum How to use checksums |
0888ac6374a526e4a7886a2d7f821ae2f079548585cfc5f948ad1c014a39525e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.18
|
Release files / prft-1.3.0-py3-none-any.whl
| Download URL | prft-1.3.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bdd6e697925e5eff77a3eda0162ef8a9f802e52e55e429676c4c75241485e456
|
|
BLAKE2b-256 checksum How to use checksums |
7e5d6077e819c6e070ab52dde8c8a24fc783f56afc9300d3802cf1f8c7f40ab8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.18
|