Skip to main content

A tool to generate a file tree structure of a project with .gitignore support

Project description

Project File Tree (pft)

pft 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.

Installation

Install pft via pip:

pip install pft

Usage

Use pft in the terminal to display a project’s file structure.

Basic Command

pft path_to_project

You can also use . to specify the current directory if you are in the project directory:

pft .

Options

  • --no-ignore: Show all files, including those listed in .gitignore.
  • --no-dot: Include hidden files (dotfiles) in the output.

Example:

pft path_to_project --no-ignore --no-dot

Example Output

Running pft 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

prft-1.0.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

prft-1.0.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file prft-1.0.0.tar.gz.

File metadata

  • Download URL: prft-1.0.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for prft-1.0.0.tar.gz
Algorithm Hash digest
SHA256 133407ba9f8c647c00e1d53ebfe562771d30e01bea9e789afc7e1298f1c8ad6f
MD5 45341dca42dbf4030d25967a5f857702
BLAKE2b-256 5ce8d5a31a15c87420612edaa7ed72e19e1b343426bc29a7780c0356a5eb4156

See more details on using hashes here.

File details

Details for the file prft-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: prft-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for prft-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9907ebc83c0b40409a245765289080788c32aa87146803f34d6ff59c4452bcd
MD5 3620069f33e98b6d24e554d1983a1a62
BLAKE2b-256 462f3dc1bb9a346ccd527062d811b7dbaea546154ec8e9b6e3fba181af38d74c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page