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.7.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

treemapper-0.0.7-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for treemapper-0.0.7.tar.gz
Algorithm Hash digest
SHA256 0db3df3334e14abd83bdf1f9532cd3e1a713ca8fa006ae9edba118a9e23c3f57
MD5 48b6e0834c5d044d2caf18768f282459
BLAKE2b-256 d45da60068a059ed60f9c6bcbad8ae6ed42ce6a5ff3bdba43954774b442d1943

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for treemapper-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 80c566059acc23df81f5884bcbf4cc25884a19b824e21c0743debbc234e44751
MD5 6e47805c59567018404b9abe9fcdcce5
BLAKE2b-256 3066c8eb55a48e17b6b3f02b92741c93f1c088146733af4ca3277e5051208eb5

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