Skip to main content

Directory content dumping utility

Project description

rootdump

A Python library for dumping directory contents into a single text file. It allows you to easily inspect and document your project structure and file contents.

Features

  • Dump all text files from a directory into a single file
  • Exclude binary files (optional)
  • Filter files by extension
  • Generate tree-style directory structure visualization
  • UTF-8 support

Installation

pip install rootdump

Usage

Command Line Interface

Basic usage:

rootdump /path/to/source output.txt

Exclude binary files:

rootdump /path/to/source output.txt --exclude-binary

Include only specific file extensions:

rootdump /path/to/source output.txt --extensions .py .txt .md

Skip directory tree structure:
```bash
rootdump /path/to/source output.txt --no-tree

Python API

from rootdump import dump_directory

# Basic usage
dump_directory("source_dir", "output.txt")

# Exclude binary files and include only specific extensions
dump_directory(
    "source_dir",
    "output.txt",
    exclude_binary=True,
    include_extensions=[".py", ".txt"],
    show_tree=True  # Set to False to skip directory tree
)

Output Format

The output file will contain:

  1. A tree-style directory structure overview
  2. Contents of each file, separated by headers showing the relative path

Example output:

# Directory structure:
# .
# ├── src/
# │   ├── __init__.py
# │   └── core.py
# └── tests/
#     └── test_core.py

## src/__init__.py

[file contents here]

## src/core.py

[file contents here]

License

MIT License

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

rootdump-0.1.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rootdump-0.1.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file rootdump-0.1.1.tar.gz.

File metadata

  • Download URL: rootdump-0.1.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.1

File hashes

Hashes for rootdump-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d4fdbe59de8ff4b4d84dfc09d361aae803f106690b702e955902050d34002b2e
MD5 aefca7c190b05fdd52f997e4360dfc9a
BLAKE2b-256 5cd376cf8f3d6b06edf037c1ab18000af26d6dc2aeae1844cfe9a80ab1200bb4

See more details on using hashes here.

File details

Details for the file rootdump-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: rootdump-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.1

File hashes

Hashes for rootdump-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d923755f3a900928817f7635121baf2dd1774cf33bcda0d81d56eda4f211866a
MD5 8d50c3ace4f85bedc5d6c8e3c3dc76e4
BLAKE2b-256 78aeea989f6820f25935787efe4a46728f64c7e47db628e12255b98d88cd274c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page