From 329ac941fd7984a4d2bc6f529eaec3123d07f4c2 Mon Sep 17 00:00:00 2001 From: Falko Habel Date: Sun, 19 Jan 2025 22:37:25 +0100 Subject: [PATCH] finalized version 0.0.5 --- README.md | 58 ++++++++++++++++++++++++++++++++++++- tree_structurer/__main__.py | 1 - 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7141c9b..d86c686 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,59 @@ # Tree-Structurer -Gives you an overview of your Project structure \ No newline at end of file +This is a Python package designed to display directory structures in a tree-like format. This tool provides an easy-to-read overview of the directory hierarchy, making it easier for developers to navigate complex project structures. + +#### Installation + +To install `tree_structurer`, you can use pip: + +```bash +pip install pip install git+https://gitea.fabelous.app/Fabel/Tree-Structurer.git + +``` + +#### Usage + +You can run `tree_structurer` from the command line. By default, it will analyze the current directory and print its structure in a tree-like format. You can also specify a path to another directory. + +To display the directory structure of the current directory: + +```bash +python -m tree_structurer +``` + +To display the directory structure of a specific directory: + +```bash +python -m tree_structurer /path/to/directory +``` + +#### Options + +- `-v` or `--verbose`: Show more detailed output, including information about the path being analyzed. + +Example: + +```bash +python -m tree_structurer /path/to/directory -v +``` + +#### Important Files and Folders Ignored + +By default, `tree_structurer` ignores files and folders that start with `_` or `.`. However, it does include the following exceptions: + +- `__init__.py` and `__main__.py` files: These are considered important and will be included in the output. +- Special folders like `build`, `.git`, `node_modules`, etc.: These are also ignored to keep the output focused on the essential parts of the directory structure. + +#### Example Output + +``` +dir Structure for /path/to/directory: +/path/to/directory +├── main.py +├── module1 +│ ├── __init__.py +│ └── submodule1.py +└── utils + ├── helper.py + └── constants.py +``` diff --git a/tree_structurer/__main__.py b/tree_structurer/__main__.py index ba5c985..cb5c6d4 100644 --- a/tree_structurer/__main__.py +++ b/tree_structurer/__main__.py @@ -17,7 +17,6 @@ def main(): create_tree_structurer() # Get and print structure directly structure = get_structure(args.path) - print(f"dir Structure for {args.path}:") for line in structure: print(line)