Skip to main content

A tool for mapping directory structures

Project description

TreeMapper

TreeMapper is a Python tool designed to represent directory structures in YAML format.

Features

  • Generates YAML representation of directory structures
  • Includes file contents in the output
  • Respects .gitignore files and a custom ignore list (.treemapperignore)

Installation

You can install TreeMapper using pip:

pip install treemapper

Usage

After installation, you can run TreeMapper from the command line:

treemapper [directory_path] [-i IGNORE_FILE] [-o OUTPUT_FILE]
  • directory_path: The directory to analyze (default: current directory)
  • -i IGNORE_FILE, --ignore-file IGNORE_FILE: Path to the ignore file (default: .treemapperignore in the current directory)
  • -o OUTPUT_FILE, --output-file OUTPUT_FILE: Path to the output YAML file (default: directory_tree.yaml in the current directory)

If no directory path is provided, TreeMapper will analyze the current directory.

Example Output

name: example_directory
type: directory
children:
  - name: file1.txt
    type: file
    content: |
      This is the content of file1.txt
  - name: subdirectory
    type: directory
    children:
      - name: file2.py
        type: file
        content: |
          def hello_world():
              print("Hello, World!")

Configuration

TreeMapper uses a .treemapperignore file to exclude certain files and directories from the analysis. The format is similar to .gitignore. You can create this file in the directory you're analyzing or specify a custom ignore file using the -i option.

Example .treemapperignore:

*.log
node_modules
__pycache__

Contact

Nikolay Eremeev - nikolay.eremeev@outlook.com

Project Link: https://github.com/nikolay-e/TreeMapper

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

treemapper-0.0.4.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

treemapper-0.0.4-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file treemapper-0.0.4.tar.gz.

File metadata

  • Download URL: treemapper-0.0.4.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for treemapper-0.0.4.tar.gz
Algorithm Hash digest
SHA256 edbbfe9c339c9ec244309fd27608c64c68c40bbcaed2874b95bbb8942d591523
MD5 5c9c6dd1e34ab4f206fa5e048c068e55
BLAKE2b-256 5ab100c8ded3fde2814ebf961390e4ec0b07cc1f909cd60c7aa2f720fe3e42a7

See more details on using hashes here.

File details

Details for the file treemapper-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: treemapper-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for treemapper-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d85b82c37d03cea82283a6e43c6c5c2bddd0e9bb984ce5d93b82174e5ccfeb2d
MD5 a622390f6c26572ae9dc6996725bb158
BLAKE2b-256 dfb2e177132908ce6e7f757a8d94fefa58a2f18e5a907c5567de2052c1625c68

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