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

Uploaded Source

Built Distribution

treemapper-0.0.6-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: treemapper-0.0.6.tar.gz
  • Upload date:
  • Size: 9.8 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.6.tar.gz
Algorithm Hash digest
SHA256 c9213bd7e72fc4a5e9f847116c8b01bbe14fd0814e3f721ff21d0578c4295b20
MD5 9beb75e2b45f364ba33ec940797b53f1
BLAKE2b-256 beb3e1b9a3f0f50bfa035cbffe060b8599e248414d5cb99a8a550ac61887784c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: treemapper-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 8.8 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b90144d9f7470664d5d8477d317cdc8b4600894804592e28c091d8d9f0e54da2
MD5 1ab702c329c38b447327008c3e6f1abf
BLAKE2b-256 3fe90327b0ad20d8024d4f932e449980f97410a4f9f4b9d9481f27b4dcc405c1

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