DirecTracer


NameDirecTracer JSON
Version 1.0.6 PyPI version JSON
download
home_pagehttps://github.com/Hardvan/DirecTracer
SummaryDirecTracer 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.
upload_time2024-04-03 14:00:30
maintainerNone
docs_urlNone
authorHardik Pawar
requires_python>=3.6
licenseNone
keywords directory structure visualization folder hierarchy file organization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.

## DirecTracer on PyPI

View the DirecTracer package on PyPI by clicking [here](https://pypi.org/project/DirecTracer/).

## Features

- `save_directory_structure()` function:

  - 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.
  - Text & loading animations while generating the directory structure.

- `generate_markdown_table()` function:

  - Generates a Markdown table from the given directory structure.
  - Includes columns of Serial Number and clickable links to the files through the file names.

## Demonstration Video

Click on the thumbnail below to watch the demonstration video on YouTube.

[![DirecTracer](./demo/thumbnail2.png)](https://youtu.be/FqMauKiTvVs?si=FJlBiQBwpZb7_IPm)

## Usage

Install the DirecTracer package using the following command:

```bash
pip install DirecTracer
```

OR

Clone this repository using the following command:

```bash
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.

```python
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
)
```

View the [`run.py`](./run.py) file for a complete example.

The `save_directory_structure()` 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.

The `generate_markdown_table()` function accepts the following parameters:

- **root_dir (str)**: The root directory to start scanning from. Defaults to the current working directory.
- **markdown_output_file (str)**: The name of the Markdown output file. Defaults to "markdown_table.md".
- **animation (bool, optional)**: Enable/Disable the loading animation. Defaults to False.
- **ignored_extensions (list, optional)**: List of file extensions to ignore. Defaults to [".exe"].



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Hardvan/DirecTracer",
    "name": "DirecTracer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "directory structure, visualization, folder hierarchy, file organization",
    "author": "Hardik Pawar",
    "author_email": "hardikpawarh@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/08/c5/9f5e8501b3e1724d9cf85acd3ec1eff64885abc90e58db4640fb34cbefcc/DirecTracer-1.0.6.tar.gz",
    "platform": null,
    "description": "# DirecTracer\r\n\r\nDirecTracer 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.\r\n\r\n## DirecTracer on PyPI\r\n\r\nView the DirecTracer package on PyPI by clicking [here](https://pypi.org/project/DirecTracer/).\r\n\r\n## Features\r\n\r\n- `save_directory_structure()` function:\r\n\r\n  - Generates a directory structure in text and Markdown formats.\r\n  - Supports ignoring specific directories and file extensions.\r\n  - Outputs clickable links in the Markdown file for easy navigation.\r\n  - Text & loading animations while generating the directory structure.\r\n\r\n- `generate_markdown_table()` function:\r\n\r\n  - Generates a Markdown table from the given directory structure.\r\n  - Includes columns of Serial Number and clickable links to the files through the file names.\r\n\r\n## Demonstration Video\r\n\r\nClick on the thumbnail below to watch the demonstration video on YouTube.\r\n\r\n[![DirecTracer](./demo/thumbnail2.png)](https://youtu.be/FqMauKiTvVs?si=FJlBiQBwpZb7_IPm)\r\n\r\n## Usage\r\n\r\nInstall the DirecTracer package using the following command:\r\n\r\n```bash\r\npip install DirecTracer\r\n```\r\n\r\nOR\r\n\r\nClone this repository using the following command:\r\n\r\n```bash\r\ngit clone https://github.com/Hardvan/DirecTracer\r\ncd DirecTracer\r\npip install .\r\n```\r\n\r\nCall the `save_directory_structure` function from the `DirecTracer` module to generate the directory structure.\r\n\r\n```python\r\nfrom DirecTracer import save_directory_structure\r\nimport os\r\n\r\n\r\n# Generate the directory structure in text and Markdown formats\r\nsave_directory_structure(\r\n   root_dir=os.getcwd(),\r\n   text_output_file=\"directory_structure.txt\",\r\n   markdown_output_file=\"directory_structure.md\",\r\n   animation=True\r\n)\r\n```\r\n\r\nView the [`run.py`](./run.py) file for a complete example.\r\n\r\nThe `save_directory_structure()` function accepts the following parameters:\r\n\r\n- **root_dir (str):** The root directory to start scanning from. Defaults to the current working directory.\r\n- **text_output_file (str):** The name of the text output file. Defaults to \"directory_structure.txt\".\r\n- **markdown_output_file (str):** The name of the Markdown output file. Defaults to \"directory_structure.md\".\r\n- **ignored_directories (list, optional):** List of directories to ignore. Defaults to [\".git\", \".vscode\", \"venv\", \".venv\", \".idea\", \"out\"].\r\n- **ignored_extensions (list, optional):** List of file extensions to ignore. Defaults to [\".exe\"].\r\n- **animation (bool, optional):** Enable/Disable the loading animation. Defaults to False.\r\n\r\nThe `generate_markdown_table()` function accepts the following parameters:\r\n\r\n- **root_dir (str)**: The root directory to start scanning from. Defaults to the current working directory.\r\n- **markdown_output_file (str)**: The name of the Markdown output file. Defaults to \"markdown_table.md\".\r\n- **animation (bool, optional)**: Enable/Disable the loading animation. Defaults to False.\r\n- **ignored_extensions (list, optional)**: List of file extensions to ignore. Defaults to [\".exe\"].\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "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.",
    "version": "1.0.6",
    "project_urls": {
        "Homepage": "https://github.com/Hardvan/DirecTracer"
    },
    "split_keywords": [
        "directory structure",
        " visualization",
        " folder hierarchy",
        " file organization"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "58dce01669b4489212fc48b14f484dbc24afc6350f59284243d180f8c559320f",
                "md5": "037b280e5e4307faf74acca3a87c64b3",
                "sha256": "73988e2ed9f382db1cc59715612183b9d209b05e1d0f069fc37682e10cfbd292"
            },
            "downloads": -1,
            "filename": "DirecTracer-1.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "037b280e5e4307faf74acca3a87c64b3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 7030,
            "upload_time": "2024-04-03T14:00:29",
            "upload_time_iso_8601": "2024-04-03T14:00:29.799393Z",
            "url": "https://files.pythonhosted.org/packages/58/dc/e01669b4489212fc48b14f484dbc24afc6350f59284243d180f8c559320f/DirecTracer-1.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "08c59f5e8501b3e1724d9cf85acd3ec1eff64885abc90e58db4640fb34cbefcc",
                "md5": "8335694e559278406903bb305f83fd89",
                "sha256": "a0b2b5847741aa1f00643303d7a18287305dd0f5a1ba711340578e65d68666ce"
            },
            "downloads": -1,
            "filename": "DirecTracer-1.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "8335694e559278406903bb305f83fd89",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 6924,
            "upload_time": "2024-04-03T14:00:30",
            "upload_time_iso_8601": "2024-04-03T14:00:30.966371Z",
            "url": "https://files.pythonhosted.org/packages/08/c5/9f5e8501b3e1724d9cf85acd3ec1eff64885abc90e58db4640fb34cbefcc/DirecTracer-1.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-03 14:00:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Hardvan",
    "github_project": "DirecTracer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "directracer"
}
        
Elapsed time: 0.21242s