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 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

pip install gitlab-og-image-generator

Using uv

uv add gitlab-og-image-generator

🚀 Usage

Repository OG Image

Generate an OG image for a public repository:

gogg repo my-project --group my-group

With a personal access token for private repositories:

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

Customize the output:

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 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-2.0 License. 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.2.0.tar.gz (429.2 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.2.0-py3-none-any.whl (430.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gogg-0.2.0.tar.gz
  • Upload date:
  • Size: 429.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.22 {"installer":{"name":"uv","version":"0.11.22","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.2.0.tar.gz
Algorithm Hash digest
SHA256 35800744eefc8d5e7fd7bc05dcd544e987b67509e42baec548468700c94384ca
MD5 89b2b09c61fa3e2bbaec8b68e6acac0a
BLAKE2b-256 7743cde5ea7086ae495522b0fb5a862711f3a731a9ed6e1eaf65e5e07329c429

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gogg-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 430.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.22 {"installer":{"name":"uv","version":"0.11.22","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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbb983ab77bcea19807115ed2b847aaf8534c668914b13b4e2cfc40eb47d99b4
MD5 9d291600b00f5204bcba6a5b14bfa8be
BLAKE2b-256 4297a81ce2c20eb2d4bebff59dfddc38444436c98bd18f895ab47a2d63f3f79b

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