included creation examples
Gitea Actions For Tree-Structurer / Explore-Gitea-Actions (push) Successful in 21s
Details
Gitea Actions For Tree-Structurer / Explore-Gitea-Actions (push) Successful in 21s
Details
This commit is contained in:
parent
40e55ca55a
commit
b13b788963
83
README.md
83
README.md
|
@ -1,27 +1,26 @@
|
|||
# prodir
|
||||
|
||||
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.
|
||||
This is a Python package designed to display and create 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 and automate the creation of directory layouts from predefined files.
|
||||
|
||||
#### Installation
|
||||
|
||||
To install `tree_structurer`, you can use pip:
|
||||
To install `prodir`, you can use pip:
|
||||
|
||||
```bash
|
||||
pip install git+https://gitea.fabelous.app/Fabel/prodir.git
|
||||
|
||||
pip install git+https://gitea.fabelous.app/Fabel/prodir.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.
|
||||
You can run `prodir` 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 prodir
|
||||
python -m prodir display
|
||||
```
|
||||
|
||||
or
|
||||
or
|
||||
|
||||
```bash
|
||||
prodir
|
||||
|
@ -29,18 +28,38 @@ prodir
|
|||
|
||||
To display the directory structure of a specific directory:
|
||||
|
||||
```bash
|
||||
python -m prodir display /path/to/directory
|
||||
```
|
||||
or
|
||||
|
||||
|
||||
```bash
|
||||
python -m prodir /path/to/directory
|
||||
```
|
||||
|
||||
To create a directory structure from a file:
|
||||
|
||||
```bash
|
||||
python -m prodir create /path/to/structure/file.txt -o /output/directory
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
python -m prodir create /path/to/structure/file.txt #will create it in current dir
|
||||
```
|
||||
|
||||
#### Options
|
||||
|
||||
- `-v` or `--verbose`: Show more detailed output, including information about the path being analyzed.
|
||||
- `-o` or `--output`: Specify the output directory for the `create` command.
|
||||
|
||||
Example:
|
||||
Examples:
|
||||
|
||||
```bash
|
||||
python -m prodir /path/to/directory -v
|
||||
python -m prodir display /path/to/directory -v
|
||||
```
|
||||
|
||||
#### Important Files and Folders Ignored
|
||||
|
@ -49,16 +68,46 @@ By default, `prodir` ignores files and folders that start with `_` or `.`. Howev
|
|||
|
||||
- `__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 Input
|
||||
|
||||
```plaintext
|
||||
project/
|
||||
├── src/
|
||||
│ ├── __init__.py
|
||||
│ ├── main.py
|
||||
│ ├── module1.py
|
||||
│ └── module2.py
|
||||
├── config/
|
||||
│ └── config.yaml
|
||||
├── .gitignore
|
||||
├── pyproject.toml
|
||||
├── setup.py
|
||||
├── LICENSE
|
||||
└── README.m
|
||||
```
|
||||
|
||||
#### Example Output
|
||||
|
||||
```
|
||||
Analyzing directory: /path/to/directory:
|
||||
```plaintext
|
||||
LICENSE
|
||||
README.m
|
||||
config/
|
||||
└── config.yaml
|
||||
pyproject.toml
|
||||
setup.py
|
||||
src/
|
||||
├── __init__.py
|
||||
├── main.py
|
||||
├── module1
|
||||
│ ├── __init__.py
|
||||
│ └── submodule1.py
|
||||
└── utils
|
||||
├── helper.py
|
||||
└── constants.py
|
||||
├── module1.py
|
||||
└── module2.py
|
||||
```
|
||||
|
||||
#### Commands
|
||||
|
||||
- `display`: Displays the directory structure of a specified path or the current directory.
|
||||
- Usage: `prodir display [path] [-v]`
|
||||
- Example: `python -m prodir display /path/to/directory`
|
||||
|
||||
- `create`: Creates a directory structure from a file containing the structure definition.
|
||||
- Usage: `prodir create [file] [output_directory] [-v]`
|
||||
- Example: `python -m prodir create /path/to/structure/file.txt`
|
|
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||
|
||||
[project]
|
||||
name = "prodir"
|
||||
version = "0.0.8"
|
||||
version = "0.1.0"
|
||||
description = "A module for analyzing and creating directory structures"
|
||||
scripts = {prodir = "prodir.__main__:main"}
|
||||
dependencies = []
|
||||
|
|
2
setup.py
2
setup.py
|
@ -20,7 +20,7 @@ tree_structurer_module = Extension(
|
|||
|
||||
setup(
|
||||
name='prodir',
|
||||
version='0.0.9',
|
||||
version='0.1.0',
|
||||
description='A module for analyzing directory structures',
|
||||
ext_modules=[tree_structurer_module],
|
||||
packages=find_packages(where="src"),
|
||||
|
|
Loading…
Reference in New Issue