A tool to generate a file tree structure of a project with .gitignore support
Project description
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
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
Built Distribution
File details
Details for the file prft-1.2.1.tar.gz
.
File metadata
- Download URL: prft-1.2.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08b66a352d2fe85ba187cbb85ec1f6460af2463b4e1b9b0383372f7ee810c0b2 |
|
MD5 | 1a494bda4cdc81c844ff209550b82c82 |
|
BLAKE2b-256 | 067b4fb04d30bfe87d49eedf14c1be25c6ea51aec20dc7cacaa8d419a30c9ca5 |
File details
Details for the file prft-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: prft-1.2.1-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8042f7fbcc7aa08f86406ca97bc9eb21d199ab315cd4ee85a6ca16e2a7df4181 |
|
MD5 | 2ffee4a87f0634c50efaf1672068ce20 |
|
BLAKE2b-256 | bc9a4217397fcffebeb9b336cd69275238cd307e5abdc692a0f5c1535fe6068c |