Skip to main content

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

  1. Ensure you have Python installed on your system.

  2. Clone this repository or download the DirecTracer.py file.

    git clone https://github.com/Hardvan/DirecTracer
    cd DirecTracer
    
  3. Run the script with the following command:

    python DirecTracer.py
    
  4. Once the script completes, you'll find the generated text and Markdown files in the same directory.

To call the function save_directory_structure from another Python script, you can use the following code:

from DirecTracer import save_directory_structure

save_directory_structure(
    directory="path/to/directory",
    ignore_dirs=["dir1", "dir2"],
    ignore_exts=[".ext1", ".ext2"],
)

It has the following arguments:

  • root_dir (str): The root directory to start scanning from.
  • text_output_file (str): The name of the text output file.
  • markdown_output_file (str): The name of the Markdown output file.
  • ignored_directories (list, optional): List of directories to ignore. Defaults to None.
  • ignored_extensions (list, optional): List of file extensions to ignore. Defaults to None.
  • 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

DirecTracer-1.0.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

DirecTracer-1.0.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: DirecTracer-1.0.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.4

File hashes

Hashes for DirecTracer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7d88cdf0a2fba1c933961d3efe346d339a4996a9db9ecd6591efc328278be05e
MD5 aea63e55a99f2c631cfa4658a850854e
BLAKE2b-256 6f8df14e4f23a4c66ed83e37b9f727f04b6e031d3131b96f76bb267b1d97fbeb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: DirecTracer-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.4

File hashes

Hashes for DirecTracer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73e9d9af5fb8df17a1858ec67d1afbd14d3e2bafc2dffd8a99b1e2cbfe30871d
MD5 836413d91e1192bf3eb36a5a73ca0817
BLAKE2b-256 cd503f081905e151c4a9aa3c369587778702fdcc65a0ee67c60298533f5c9903

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