Skip to main content

A Python CLI to generate a tree structured diagram for any directory

Project description

gendia

A Python CLI to generate a tree structured diagram for any directory!


Imagine this: you are on Discord and is request help from someone about a project you are working on. You want to show the structure of your project directory to the person. You can't just send a screenshot of the directory because it's too big and the person won't be able to see the whole structure. You can't just send a text file with the structure because it's too boring and the person won't be able to understand it easily. What do you do? You use gendia!

Heres an example of a tree structured diagram generated by gendia:

project
├── src
│   ├── main.py
│   ├── utils
│   │   ├── __init__.py
│   │   ├── helper.py
│   │   └── helper2.py
│   ├── tests
│   │   ├── __init__.py
│   │   ├── test_main.py
│   │   └── test_helper.py
│   └── README.md
├── LICENSE
└── .gitignore

Not just that, it is color coded! The directories are in blue, and different file types are in different colors. This makes it easier to understand the structure of the directory.

Installation

To add gendia to your project, run:

pip install gendia

This should install gendia to your project. You can now use it to generate tree structured diagrams for your directories.

Usage

To use gendia, run:

gendia path/to/directory

This should generate a tree structured diagram for the current working directory. You can also specify the output file by using the -o flag:

gendia -o output.txt

This should generate a tree structured diagram for the current working directory and save it to output.txt.

--hidden flag can be used to show hidden files and directories:

gendia --hidden

--depth flag can be used to specify the max depth of the foulders to go into, 1 being the lowest:

gendia --depth 1

Config files

Gendia's config file can reside in either of the 2 directory's:

~/gendia_config.ini

or

~/Scripts/gendia_config.ini

You can add the following contents to the file:

[settings]
exclude = .git,__pycache__,venv

The excluded files and foulders in the config file will be appended to the other excluded files you later specify with the --exclude flag.

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

gendia-1.4.4.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

gendia-1.4.4-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file gendia-1.4.4.tar.gz.

File metadata

  • Download URL: gendia-1.4.4.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for gendia-1.4.4.tar.gz
Algorithm Hash digest
SHA256 351ed87bd4aff0ded29da89fe93b9e8f072734a0a433ca3e1b38f314418e23f0
MD5 93683b2f76fed49d3e8cce226ac688b7
BLAKE2b-256 e80058b16718d3c6b90cc034deb5ce75c125bd1bd6803c1b1029b193f740acef

See more details on using hashes here.

File details

Details for the file gendia-1.4.4-py3-none-any.whl.

File metadata

  • Download URL: gendia-1.4.4-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for gendia-1.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e89b01546780e7388cc6ae523b8e8c4c7093fcd348c4a27a1d8cb912e83fc2e1
MD5 e3c6a31d9dc4499559fc6fb4538676b9
BLAKE2b-256 92f643a80eaf25110b93ecba591ab0712cd6efd9f82272b27685d468c84a1bb0

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