DirecTracer is a Python script that generates a directory structure in both text and Markdown formats. It can be used to visualize the hierarchy of folders and files in a given directory, while also excluding specific folders and file extensions.
Project description
DirecTracer
DirecTracer is a Python script that generates a directory structure in both text and Markdown formats. It can be used to visualize the hierarchy of folders and files in a given directory, while also excluding specific folders and file extensions.
Features
- Generates a directory structure in text and Markdown formats.
- Supports ignoring specific directories and file extensions.
- Outputs clickable links in the Markdown file for easy navigation.
Usage
Install the DirecTracer package using the following command:
pip install DirecTracer
OR
Clone this repository using the following command:
git clone https://github.com/Hardvan/DirecTracer
cd DirecTracer
pip install .
Call the save_directory_structure
function from the DirecTracer
module to generate the directory structure.
from DirecTracer import save_directory_structure
import os
# Generate the directory structure in text and Markdown formats
save_directory_structure(
root_dir=os.getcwd(),
text_output_file="directory_structure.txt",
markdown_output_file="directory_structure.md",
animation=True
)
The function accepts the following parameters:
- root_dir (str): The root directory to start scanning from. Defaults to the current working directory.
- text_output_file (str): The name of the text output file. Defaults to "directory_structure.txt".
- markdown_output_file (str): The name of the Markdown output file. Defaults to "directory_structure.md".
- ignored_directories (list, optional): List of directories to ignore. Defaults to [".git", ".vscode", "venv", ".venv", ".idea", "out"].
- ignored_extensions (list, optional): List of file extensions to ignore. Defaults to [".exe"].
- animation (bool, optional): Enable/Disable the loading animation. Defaults to False.
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 DirecTracer-1.0.3.tar.gz
.
File metadata
- Download URL: DirecTracer-1.0.3.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ec2cc70c52cbe2f8b164e1140bb2fbb91c5a56328f2a8ad758ce374c305d408 |
|
MD5 | 8ce81e148c50a44628f84afc6a913d35 |
|
BLAKE2b-256 | 330b05da697da36ad4570adb3a95ce288d03222c2e8db36c2124c4675a4a8427 |
File details
Details for the file DirecTracer-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: DirecTracer-1.0.3-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89ff16871672f18bb4cfe9c436a219ad099a382416f54622f158104ca02f31dc |
|
MD5 | edfaea71259035cba74c6e3cefb768d0 |
|
BLAKE2b-256 | 099bf92a0eaf5c2ad06abd973e7f23bfe6c3b6f8f6f812158a0d63df5e0cf879 |