Metadata-Version: 2.4
Name: gogg
Version: 0.2.0
Summary: Gitlab Open Graph Generator
Keywords: dynova,generator,gitlab,image,open graph,softbutterfly
Author: Dynova Development Team, zodiacfireworks, James Socol
Author-email: Dynova Development Team <dev@dynova.io>, zodiacfireworks <martin.vuelta@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: cairosvg>=2.9.0
Requires-Dist: pillow>=12.2.0
Requires-Dist: python-gitlab>=8.4.0
Requires-Dist: rich>=15.0.0
Requires-Dist: typer>=0.26.7
Maintainer: zodiacfireworks
Maintainer-email: zodiacfireworks <martin.vuelta@gmail.com>
Requires-Python: >=3.11.0, <4.0.0
Project-URL: Bug Tracker, https://gitlab.com/softbutterfly/open-source/gitlab-og-image-generator/-/issues
Project-URL: Changelog, https://gitlab.com/softbutterfly/open-source/gitlab-og-image-generator/-/blob/v0.2.0/CHANGELOG.md
Project-URL: Documentation, https://softbutterfly.gitlab.io/open-source/gitlab-og-image-generator
Project-URL: Download, https://gitlab.com/softbutterfly/open-source/gitlab-og-image-generator/-/archive/v0.2.0/gitlab-og-image-generator-v0.2.0.tar.gz
Project-URL: Homepage, https://gitlab.com/softbutterfly/open-source/gitlab-og-image-generator
Project-URL: Issues, https://gitlab.com/softbutterfly/open-source/gitlab-og-image-generator/-/issues
Project-URL: Repository, https://gitlab.com/softbutterfly/open-source/gitlab-og-image-generator
Description-Content-Type: text/markdown

# GitLab OG Image Generator

**Open Graph images for your Gitlab repositories.**

![Community-Project][repository:banner]

![PyPI - Supported versions][pypi:badge:python]
![PyPI - Package version][pypi:badge:version]
![PyPI - Downloads][pypi:badge:downloads]
![PyPI - License][pypi:badge:license]
[![Codacy Grade Badge][codacy:grade]][codacy:dashboard]
[![Codacy Coverage Badge][codacy:coverage]][codacy:dashboard]
[![Gitlab Pipeline Status][repository:pipeline]][repository:commits]

A CLI tool to generate Open Graph images for GitLab entities.

## ✨ Features

- Subcommand-based CLI (`gogg repo ...`) for extensibility
- Fetches repository metadata from the GitLab API (stars, forks, issues, contributors, languages)
- Generates styled OG images with project name, description, and metrics
- Supports custom icons (URL or local file path)
- Configurable metric visibility (contributors, issues, stars, forks)
- Output formats: PNG, JPG, WebP
- Language color bar based on repository language breakdown

## 📋 Requirements

- Python 3.11 or higher

## 📦 Installation

### Using pip

```bash
pip install gitlab-og-image-generator
```

### Using uv

```bash
uv add gitlab-og-image-generator
```

## 🚀 Usage

### Repository OG Image

Generate an OG image for a public repository:

```bash
gogg repo my-project --group my-group
```

With a personal access token for private repositories:

```bash
gogg repo my-project --group my-group/subgroup --pat glpat-xxxx
```

Customize the output:

```bash
gogg repo my-project --group my-group \
  --headline "My Organization" \
  --description "A custom description for the OG image" \
  --icon ./logo.png \
  --format png \
  --output my-image.png \
  --no-contributors \
  --no-issues
```

### Options

#### Shared Options (available on all subcommands)

| Option          | Description                                                                      |
| --------------- | -------------------------------------------------------------------------------- |
| `--headline`    | Headline text (default: group path from API)                                     |
| `--description` | Description text (default: entity description from API)                          |
| `--icon`        | Custom icon URL or local file path                                               |
| `--pat`         | Personal access token for private repositories                                   |
| `--format`      | Image format: `png`, `jpg`, `webp` (default: inferred from `--output`, or `jpg`) |
| `--output`      | Output file path                                                                 |

#### Repo Subcommand Options

| Option              | Description                                     |
| ------------------- | ----------------------------------------------- |
| `--group`           | Repository group including subgroups (required) |
| `--no-contributors` | Hide contributors count                         |
| `--no-issues`       | Hide issues count                               |
| `--no-stars`        | Hide stars count                                |
| `--no-forks`        | Hide forks count                                |

## 🛠️ Development

Check out our [Contribution Guide](./CONTRIBUTING.md) for details on setting up
your development environment, running tests, and submitting pull requests.

The project uses `uv` for dependency management, `ruff` for linting, and `tox`
for multi-environment testing.

## 📜 Changelog

See the [CHANGELOG.md](./CHANGELOG.md) for a history of changes.

## 👥 Contributors

See our [list of contributors][repository:contributors].

## 📄 License

This project is licensed under the Apache-2.0 License. See the
[LICENSE](./LICENSE) file for details.

[repository:banner]: https://gitlab.com/softbutterfly/open-source/open-source-office/-/raw/master/assets/dynova/dynova-open-source--banner--community-project.png
[repository:pipeline]: https://gitlab.com/softbutterfly/open-source/gitlab-og-image-generator/badges/master/pipeline.svg
[repository:commits]: https://gitlab.com/softbutterfly/open-source/gitlab-og-image-generator/-/commits/master
[repository:contributors]: https://gitlab.com/softbutterfly/open-source/gitlab-og-image-generator/-/graphs/develop

[pypi:badge:python]: https://img.shields.io/pypi/pyversions/gogg
[pypi:badge:version]: https://img.shields.io/pypi/v/gogg
[pypi:badge:downloads]: https://img.shields.io/pypi/dm/gogg
[pypi:badge:license]: https://img.shields.io/pypi/l/gogg

[codacy:grade]: https://app.codacy.com/project/badge/Grade/ce03d12002fd4b679623bf241da6b33d
[codacy:coverage]: https://app.codacy.com/project/badge/Coverage/ce03d12002fd4b679623bf241da6b33d
[codacy:dashboard]: https://app.codacy.com/gl/softbutterfly/gitlab-og-image-generator/dashboard
