Skip to content

gbechtold/TreeTamer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

🌳 TreeTamer

TreeTamer is a powerful bash script that flattens your project's directory structure, making it easier to manage and navigate complex project hierarchies. Tame your wild directory trees with ease! 🐯

✨ Features

  • πŸ“ Flattens directory structures while preserving all files
  • πŸ”„ Handles filename collisions
  • 🚫 Excludes common directories by default (customizable)
  • πŸ” Filters files by extension
  • πŸ”— Configurable symbolic link handling
  • πŸ“Š Progress indication
  • 🌲 Generates a tree structure of the original project

✨ Quickinstall

curl -O https://raw.githubusercontent.com/gbechtold/TreeTamer/main/treetamer.sh

πŸš€ Usage

./treetamer.sh [OPTIONS]

πŸ”§ Options

  • -h, --help: πŸ” Display the help message
  • -c, --clean: 🧹 Remove existing destination directory before flattening
  • -e, --exclude: 🚫 Comma-separated list of additional directories to exclude
  • -i, --include: βœ… Comma-separated list of directories to include (overrides default exclusions)
  • -f, --filter: πŸ” Comma-separated list of file extensions to include
  • -l, --links: πŸ”— How to handle symbolic links: 'follow', 'preserve', or 'ignore' (default: ignore)

πŸ“ Example

./treetamer.sh -c -e logs,temp -i node_modules -f js,py,txt -l preserve

This command will:

  • 🧹 Clean the existing tamed tree directory
  • 🚫 Exclude 'logs' and 'temp' directories (in addition to default exclusions)
  • βœ… Include 'node_modules' directory (overriding its default exclusion)
  • πŸ” Only include .js, .py, and .txt files
  • πŸ”— Preserve symbolic links

🚫 Default Exclusions

By default, TreeTamer excludes the following directories:

node_modules, target, .git, .idea, build, dist, venv, __pycache__

You can override these exclusions using the -i, --include option.

πŸ“₯ Installation

  1. Clone this repository:
    git clone https://github.com/yourusername/TreeTamer.git
    
  2. Make the script executable:
    chmod +x treetamer.sh
    

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. πŸŽ‰

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details. πŸ“œ

About

A tool to flatten project directory structures

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages