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
Built Distribution
File details
Details for the file treemapper-0.0.5.tar.gz
.
File metadata
- Download URL: treemapper-0.0.5.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 736086dd4c931ac113cbdd3d607084cb5878c531f03ed8541db83358a2f97f6b |
|
MD5 | 45eb73c08257313cd5166aa1dd2bceb2 |
|
BLAKE2b-256 | 0c3fd091e063123d26afb449265a3aa2b83f482a4e2c2a0470ffbc263379c423 |
File details
Details for the file treemapper-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: treemapper-0.0.5-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f09404dcc4168a35ad7e6ea87bb1adcf0df7b391738b6836d56d14a520785888 |
|
MD5 | 231d23c14fa0c4d5e830ee0b6262db9c |
|
BLAKE2b-256 | 62c8c4f4d7ab4efec59ca611499d77140a3af2afec9539172ae19c082c39b85b |