Metadata-Version: 2.4
Name: blame-g
Version: 0.1.1
Summary: blame-g is a command-line tool that analyzes git repositories and generates contributor statistics — including commits, lines added/deleted, files changed, pull requests, reverts, and more — beautifully rendered in a terminal table.
Author-email: Mohammed Muzammil Anwar <mohammad.muzammil100@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Mohammed Muzammil Anwar
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: homepage, https://github.com/mcking-07/blame-g
Project-URL: repository, https://github.com/mcking-07/blame-g
Project-URL: documentation, https://github.com/mcking-07/blame-g#readme
Keywords: blame-g,git blame,git contributor stats
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Version Control
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: gitpython
Requires-Dist: rich
Dynamic: license-file

# blame-g

[![PyPI Version](https://img.shields.io/pypi/v/blame-g)](https://pypi.org/project/blame-g/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python Versions](https://img.shields.io/pypi/pyversions/blame-g)](https://pypi.org/project/blame-g/)

`blame-g` is a command-line tool that analyzes git repositories and generates contributor statistics — including commits, lines added/deleted, files changed, pull requests, reverts, and more — beautifully rendered in a terminal table.

**Geddit?** Blame- *ji*? ;)

![in-action](https://raw.githubusercontent.com/mcking-07/blame-g/refs/heads/main/assets/blame-g.png)

## Features

- **Contributor Statistics:**  Aggregates commits, lines added/deleted, files changed, pull requests, and reverts for each contributor.
- **Rich Output:** Uses the `rich` library to provide a visually appealing and informative table of statistics in your terminal.
- **Branch Specific Analysis:**  Analyze a specific branch of your repository.
- **Pull Request & Revert Detection:** Detects PRs and reverts based on commit message patterns.
  > **Note:** The detection only works if you use the default PR message patterns for Bitbucket, GitHub, and GitLab. Custom commit message formats might not be recognized.
- **Git-Aware Context:** Automatically detects and works within the current Git repository.

## Installation

### Install from PyPI

```sh
pip3 install blame-g
```

### Clone and Run from Source

```sh
git clone https://github.com/mcking-07/blame-g.git
cd blame-g

pip3 install -r requirements.txt
python3 blame-g [repo_path] [branch_name]
```

### Editable Install

```sh
git clone https://github.com/mcking-07/blame-g.git
cd blame-g

pip3 install -e .
blame-g [repo_path] [branch_name]
```

## Usage

```sh
blame-g [repo_path](defaults to the current working directory) [branch_name](defaults to main or master)
```

## License

This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).
