Metadata-Version: 2.4
Name: git-pluse
Version: 1.0.0
Summary: GitHub commit analyzer - analyze and visualize commit frequency
Home-page: https://github.com/erquren/git-pluse
Author: erquren
Author-email: erquren <contact@erquren.com>
License: MIT
Project-URL: Homepage, https://github.com/erquren/git-pluse
Project-URL: Repository, https://github.com/erquren/git-pluse
Project-URL: Issues, https://github.com/erquren/git-pluse/issues
Keywords: github,git,commit,analysis,visualization
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Version Control
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Requires-Dist: matplotlib>=3.3.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# git-pluse

A GitHub commit analyzer that fetches commit history and visualizes cumulative commits over time.

## Installation

```bash
pip install git-pluse
```

## Usage

### Basic usage - generate JSON output

```bash
git-pluse https://github.com/erquren/git-pluse
```

This will create a JSON file named `repo.json` containing detailed commit records organized by date.

### Generate visualization

```bash
git-pluse https://github.com/erquren/git-pluse show
```

This will create both a JSON file (`repo.json`) and a PNG chart (`repo.png`) showing cumulative commits.

## Features

- Fetches all commits from a GitHub repository
- Generates JSON output with commit details (user, message, sha, time) organized by date
- Visualizes cumulative commits over time with line chart
- Dynamic tick intervals based on actual project duration:
  - ≤ 30 days: daily ticks
  - ≤ 90 days: weekly ticks
  - ≤ 365 days: monthly ticks
  - ≤ 730 days: bi-monthly ticks
  - > 730 days: quarterly ticks

## JSON Output Format

```json
{
  "repo": "erquren/git-pluse",
  "url": "https://github.com/erquren/git-pluse",
  "total_commits": 1234,
  "commits_by_date": {
    "2024-01-01": [
      {
        "user": "John Doe",
        "message": "Initial commit",
        "sha": "abc123...",
        "time": "2024-01-01T12:00:00Z"
      }
    ]
  },
  "first_commit_date": "2024-01-01",
  "last_commit_date": "2024-12-31"
}
```

## Chart Features

- **X-axis**: Date
- **Y-axis**: Cumulative commit count
- Dynamic tick intervals based on project duration
- Clean line chart with data point markers
- Area fill for better visualization

## Requirements

- Python 3.7+
- requests
- matplotlib

## License

MIT License
