projectcompactor


Nameprojectcompactor JSON
Version 6.9421 PyPI version JSON
download
home_pagehttps://github.com/yourusername/projectcompactor
SummaryA powerful, user-friendly Python tool to generate project trees and file contents (with MIME detection).
upload_time2025-01-08 22:26:39
maintainerNone
docs_urlNone
authorveppy
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ProjectCompactor 🚀

[![PyPI Version](https://badge.fury.io/py/projectcompactor.svg)](https://pypi.org/project/projectcompactor/)
[![GitHub Stars](https://img.shields.io/github/stars/veppy/projectcompactor.svg?style=social&label=Star)](https://github.com/veppy1/projectcompactor)
[![License](https://img.shields.io/github/license/veppy/projectcompactor.svg)](LICENSE)
[![Build Status](https://img.shields.io/github/actions/workflow/status/veppy/projectcompactor/ci.yml?branch=main)](https://github.com/veppy1/projectcompactor/actions)

## 📦 Overview

**ProjectCompactor** is a powerful, user-friendly Python tool designed to **generate comprehensive project trees** and **extract detailed file contents** from any directory. Whether you're a developer, project manager, or enthusiast, ProjectCompactor streamlines the process of documenting and analyzing your project structure, making it easier to understand, share, and maintain your codebase.

## 🌟 Key Features

- **🔍 Comprehensive Project Tree Generation**
  - Automatically traverses directories to create a detailed hierarchical tree structure.
  - Visualizes the entire project layout with proper indentation for easy readability.

- **📄 Detailed File Content Extraction**
  - Extracts and includes contents of text-based files (e.g., `.py`, `.html`, `.txt`, `.md`).
  - Identifies binary or non-text files (e.g., `.png`, `.jpg`, `.exe`) and lists them without attempting to read their contents.

- **⚙️ Highly Configurable**
  - **Customizable File Extensions**: Specify additional file types to treat as text files.
  - **Exclusion Filters**: Exclude specific directories or file types from the analysis.
  - **Verbose Logging**: Enable detailed logging for troubleshooting and insights.

- **🚀 Efficient and Fast**
  - Utilizes multi-threading for concurrent file processing, ensuring quick execution even for large projects.
  - Progress indicators with `tqdm` provide real-time feedback during operation.

- **🛠️ Easy to Use Command-Line Interface**
  - Simple commands to generate project structures with optional parameters for customization.
  - Output can be directed to a specified file for easy sharing and documentation.

- **📈 SEO-Friendly Documentation**
  - Generates structured and detailed documentation ideal for project analysis and onboarding.

## 📋 Installation

Install **ProjectCompactor** easily using `pip`:

```bash
pip install projectcompactor
```
Ensure you have Python 3.6 or higher installed.

## 🖥️ Usage

After installation, you can use the `projectcompactor` command directly from your terminal.

### Basic Command

Generate a project structure of the current directory:

```bash
projectcompactor
```

Specify a Directory
Analyze a specific directory:

```bash
projectcompactor /path/to/your/project
```

Customize Output File
Specify a custom output file name:

```bash
projectcompactor -o my_structure.txt
```

Add Additional Text File Extensions
Include additional file extensions to treat as text files:

```bash
projectcompactor -e .rst .conf
```

Exclude Specific Directories and File Types
Exclude directories like node_modules and file types like .log:

```bash
projectcompactor --exclude-dirs node_modules .git --exclude-files .log .tmp
```

Enable Verbose Logging
Get detailed logs during execution:

```bash
projectcompactor -v
```

Full Example
Combine multiple options for a comprehensive analysis:
```bash
projectcompactor /path/to/your/project -o project_structure.txt -e .rst .conf --exclude-dirs node_modules .git --exclude-files .log .tmp -v
```


📂 Sample Output
Project Structure Section
```bash
# Project Structure

project/
    README.md
    src/
        main.py
        utils.py
    assets/
        logo.png
        styles.css
```


File Details Section
```bash
# File Details

## README.md
### Contents of README.md
# Sample Project
This is a sample project.

## src/main.py
### Contents of main.py
print("Hello, World!")

## src/utils.py
### Contents of utils.py
def helper():
    pass

## assets/logo.png
[Binary or Non-text file: logo.png]

## assets/styles.css
### Contents of styles.css
body { margin: 0; padding: 0; }
```

🎯 Use Cases
📚 Project Documentation
🔍 Uploading to Chat Assistant
🗃️ Archiving Projects
📊 Reporting


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yourusername/projectcompactor",
    "name": "projectcompactor",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "veppy",
    "author_email": "vonepern@gmail.com.com",
    "download_url": "https://files.pythonhosted.org/packages/f9/da/e95c680d2c6bb61b4d47f0d565b4d688ff5ad0a756ff65c2b533d6d82e3a/projectcompactor-6.9421.tar.gz",
    "platform": null,
    "description": "# ProjectCompactor \ud83d\ude80\n\n[![PyPI Version](https://badge.fury.io/py/projectcompactor.svg)](https://pypi.org/project/projectcompactor/)\n[![GitHub Stars](https://img.shields.io/github/stars/veppy/projectcompactor.svg?style=social&label=Star)](https://github.com/veppy1/projectcompactor)\n[![License](https://img.shields.io/github/license/veppy/projectcompactor.svg)](LICENSE)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/veppy/projectcompactor/ci.yml?branch=main)](https://github.com/veppy1/projectcompactor/actions)\n\n## \ud83d\udce6 Overview\n\n**ProjectCompactor** is a powerful, user-friendly Python tool designed to **generate comprehensive project trees** and **extract detailed file contents** from any directory. Whether you're a developer, project manager, or enthusiast, ProjectCompactor streamlines the process of documenting and analyzing your project structure, making it easier to understand, share, and maintain your codebase.\n\n## \ud83c\udf1f Key Features\n\n- **\ud83d\udd0d Comprehensive Project Tree Generation**\n  - Automatically traverses directories to create a detailed hierarchical tree structure.\n  - Visualizes the entire project layout with proper indentation for easy readability.\n\n- **\ud83d\udcc4 Detailed File Content Extraction**\n  - Extracts and includes contents of text-based files (e.g., `.py`, `.html`, `.txt`, `.md`).\n  - Identifies binary or non-text files (e.g., `.png`, `.jpg`, `.exe`) and lists them without attempting to read their contents.\n\n- **\u2699\ufe0f Highly Configurable**\n  - **Customizable File Extensions**: Specify additional file types to treat as text files.\n  - **Exclusion Filters**: Exclude specific directories or file types from the analysis.\n  - **Verbose Logging**: Enable detailed logging for troubleshooting and insights.\n\n- **\ud83d\ude80 Efficient and Fast**\n  - Utilizes multi-threading for concurrent file processing, ensuring quick execution even for large projects.\n  - Progress indicators with `tqdm` provide real-time feedback during operation.\n\n- **\ud83d\udee0\ufe0f Easy to Use Command-Line Interface**\n  - Simple commands to generate project structures with optional parameters for customization.\n  - Output can be directed to a specified file for easy sharing and documentation.\n\n- **\ud83d\udcc8 SEO-Friendly Documentation**\n  - Generates structured and detailed documentation ideal for project analysis and onboarding.\n\n## \ud83d\udccb Installation\n\nInstall **ProjectCompactor** easily using `pip`:\n\n```bash\npip install projectcompactor\n```\nEnsure you have Python 3.6 or higher installed.\n\n## \ud83d\udda5\ufe0f Usage\n\nAfter installation, you can use the `projectcompactor` command directly from your terminal.\n\n### Basic Command\n\nGenerate a project structure of the current directory:\n\n```bash\nprojectcompactor\n```\n\nSpecify a Directory\nAnalyze a specific directory:\n\n```bash\nprojectcompactor /path/to/your/project\n```\n\nCustomize Output File\nSpecify a custom output file name:\n\n```bash\nprojectcompactor -o my_structure.txt\n```\n\nAdd Additional Text File Extensions\nInclude additional file extensions to treat as text files:\n\n```bash\nprojectcompactor -e .rst .conf\n```\n\nExclude Specific Directories and File Types\nExclude directories like node_modules and file types like .log:\n\n```bash\nprojectcompactor --exclude-dirs node_modules .git --exclude-files .log .tmp\n```\n\nEnable Verbose Logging\nGet detailed logs during execution:\n\n```bash\nprojectcompactor -v\n```\n\nFull Example\nCombine multiple options for a comprehensive analysis:\n```bash\nprojectcompactor /path/to/your/project -o project_structure.txt -e .rst .conf --exclude-dirs node_modules .git --exclude-files .log .tmp -v\n```\n\n\n\ud83d\udcc2 Sample Output\nProject Structure Section\n```bash\n# Project Structure\n\nproject/\n    README.md\n    src/\n        main.py\n        utils.py\n    assets/\n        logo.png\n        styles.css\n```\n\n\nFile Details Section\n```bash\n# File Details\n\n## README.md\n### Contents of README.md\n# Sample Project\nThis is a sample project.\n\n## src/main.py\n### Contents of main.py\nprint(\"Hello, World!\")\n\n## src/utils.py\n### Contents of utils.py\ndef helper():\n    pass\n\n## assets/logo.png\n[Binary or Non-text file: logo.png]\n\n## assets/styles.css\n### Contents of styles.css\nbody { margin: 0; padding: 0; }\n```\n\n\ud83c\udfaf Use Cases\n\ud83d\udcda Project Documentation\n\ud83d\udd0d Uploading to Chat Assistant\n\ud83d\uddc3\ufe0f Archiving Projects\n\ud83d\udcca Reporting\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A powerful, user-friendly Python tool to generate project trees and file contents (with MIME detection).",
    "version": "6.9421",
    "project_urls": {
        "Homepage": "https://github.com/yourusername/projectcompactor"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ff66490b0729a99406284b3cc3d3eb5c47acd47894e00c7bd61d51ab7e4c2141",
                "md5": "23d573fe1c8792d7bc46fc6542bcd298",
                "sha256": "4bd1b6ecf9643d5f82eddf41e2fd7d9acfd122b856339266b6bea615d8e1a75f"
            },
            "downloads": -1,
            "filename": "projectcompactor-6.9421-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "23d573fe1c8792d7bc46fc6542bcd298",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 8101,
            "upload_time": "2025-01-08T22:26:37",
            "upload_time_iso_8601": "2025-01-08T22:26:37.932457Z",
            "url": "https://files.pythonhosted.org/packages/ff/66/490b0729a99406284b3cc3d3eb5c47acd47894e00c7bd61d51ab7e4c2141/projectcompactor-6.9421-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f9dae95c680d2c6bb61b4d47f0d565b4d688ff5ad0a756ff65c2b533d6d82e3a",
                "md5": "7d20b765ec08b3eaccc2f142fc23249d",
                "sha256": "2e8ef8640a51f7f702fad4af65226d366da973da2ba983d7752191bf22f5dfca"
            },
            "downloads": -1,
            "filename": "projectcompactor-6.9421.tar.gz",
            "has_sig": false,
            "md5_digest": "7d20b765ec08b3eaccc2f142fc23249d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 7904,
            "upload_time": "2025-01-08T22:26:39",
            "upload_time_iso_8601": "2025-01-08T22:26:39.930956Z",
            "url": "https://files.pythonhosted.org/packages/f9/da/e95c680d2c6bb61b4d47f0d565b4d688ff5ad0a756ff65c2b533d6d82e3a/projectcompactor-6.9421.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-08 22:26:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yourusername",
    "github_project": "projectcompactor",
    "github_not_found": true,
    "lcname": "projectcompactor"
}
        
Elapsed time: 0.40148s