Skip to main content

Gitlab Open Graph Generator

Project description

GitLab OG Image Generator

Open Graph images for your Gitlab repositories.

Community-Project

PyPI - Supported versions PyPI - Package version PyPI - Downloads PyPI - License Codacy Grade Badge Codacy Coverage Badge Gitlab Pipeline Status

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

✨ Features

  • Fetches repository metadata from the GitLab API (stars, forks, issues, contributors, languages)
  • Generates styled OG images with project name, description, and metrics
  • Supports custom group icons
  • 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

pip install gitlab-og-image-generator

Using uv

uv add gitlab-og-image-generator

🚀 Usage

If you have installed the package, you can use it with python as follows:

python -m gogg.cli --repo my-project --group my-group

You can also use uvx to directly run the tool as a command without installing it:

uvx gogg --repo my-project --group my-group

For private repositories, use a personal access token:

uvx gogg --repo my-project --group my-group/subgroup --pat glpat-xxxx

You can also customize the output:

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

Options

The following options are available:

Option Description
--repo Repository name (required)
--group Repository group including subgroups (required)
--headline Headline text (default: group path from API)
--description Description text (default: repo description from API)
--group-icon Custom group icon URL or local file path
--pat Personal access token for private repositories
--format Image format: png, jpg, webp (default: jpg)
--output Output file path
--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 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 for a history of changes.

👥 Contributors

See our list of contributors.

📄 License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gogg-0.1.0.tar.gz (428.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gogg-0.1.0-py3-none-any.whl (428.4 kB view details)

Uploaded Python 3

File details

Details for the file gogg-0.1.0.tar.gz.

File metadata

  • Download URL: gogg-0.1.0.tar.gz
  • Upload date:
  • Size: 428.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for gogg-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cb088ad5f6de7ffbd5c6bdec61eb5d6b86029d2827a85aedb3dab91cc6ae4466
MD5 8b24ad9497ba6e0b154769636df4e562
BLAKE2b-256 45b863b6a5d2d5d6321bf0e6b55b5550681cff42f946b31be818cec40ab7653e

See more details on using hashes here.

File details

Details for the file gogg-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gogg-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 428.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for gogg-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d189103bbb1c5633fa22761a65bec4419378fad1a4dde44545851780da5d87a
MD5 d733ec12bbcf27c3bffbae4e98c2db7d
BLAKE2b-256 665a651501522b6b4481902867c6c95c250e64ba40258bf688279006178779f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page