{"id":16886183,"url":"https://github.com/rexwangcc/github-avatars-gallery-generator","last_synced_at":"2025-03-20T06:16:32.918Z","repository":{"id":47071707,"uuid":"356413167","full_name":"rexwangcc/github-avatars-gallery-generator","owner":"rexwangcc","description":"Collect the avatars of all conributors of a Github repo and make a gallery","archived":false,"fork":false,"pushed_at":"2021-09-14T19:54:26.000Z","size":475,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T02:26:06.619Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rexwangcc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-09T22:31:15.000Z","updated_at":"2021-09-15T06:04:08.000Z","dependencies_parsed_at":"2022-09-15T21:00:53.122Z","dependency_job_id":null,"html_url":"https://github.com/rexwangcc/github-avatars-gallery-generator","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexwangcc%2Fgithub-avatars-gallery-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexwangcc%2Fgithub-avatars-gallery-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexwangcc%2Fgithub-avatars-gallery-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexwangcc%2Fgithub-avatars-gallery-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rexwangcc","download_url":"https://codeload.github.com/rexwangcc/github-avatars-gallery-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244560393,"owners_count":20472220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T16:38:36.252Z","updated_at":"2025-03-20T06:16:32.894Z","avatar_url":"https://github.com/rexwangcc.png","language":"Python","funding_links":["https://opencollective.com"],"categories":[],"sub_categories":[],"readme":"# github-avatars-gallery-generator\n\n[![Python](https://img.shields.io/badge/Python-3.8%2B-blue?style=flat-square\u0026logo=python)]()\n[![PyPI](https://img.shields.io/pypi/v/github-avatars-gallery-generator?style=flat-square)](https://pypi.org/project/github-avatars-gallery-generator/)\n\nA naive implementation that collects the avatars of all contributors of a Github repo and makes a gallery SVG for you.\n\n## Install\n\n```\npip install github-avatars-gallery-generator\n```\n\n_I build and upload from my macOS and Ubuntu (docker container) myself without a CI service, so\nI cannot tell if this will work for other platforms yet._\n\n## Why?\n\nThe layout is inspired by [Open Collective](https://opencollective.com) 's ability to display contributors as well as Github's own sponsors page.\n\nRecently I need to generate such SVGs for some of my projects, which are not on Open Collective, so I spent some time writing this generator for my own requirements. It's an _ugly_ solution and has certain known issues (slow, large SVG size, etc.), yet works for my needs.\n\n## How?\n\nUsing `vuepress` project as an example, either download the `main.py` or install it from PyPI, and run something like:\n\n```\ngh-gallery --organization vuejs --repo vuepress\n```\n\nafter a couple seconds, it will generate an SVG file \"contributors_vuejs_vuepress_10.svg\" to the current directory. The `10` there means it will put 10 avatars\nper row in the resulting SVG. For all available options, use `gh-gallery -h`:\n\n```\nA CLI to generate a gallery visualization of contributors of a Github repo.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -o ORGANIZATION, --organization ORGANIZATION\n                        The Github organization of your repo\n  -r REPO, --repo REPO  The Github repository\n  -a AVATAR_SIZE, --avatar-size AVATAR_SIZE\n                        The size of your avatars in the resulting SVG\n  -n NUM_PER_ROW, --num-per-row NUM_PER_ROW\n                        The number of avatars you want to display per row\n```\n\n### Comparison\n\nWith `gh-gallery --organization vuejs --repo vuepress -n 34 -a 24`, I'm\n able to generate a contributors gallery of `vuepress` repo,\nI already converted the resulting SVG into PNG using `cairosvg`, here is how it looks:\n\n![](./misc/contributors_vuejs_vuepress_34.png)\n\nYou could compare it with their [official one](https://github.com/vuejs/vuepress#code-contributors)\n\n## By the way...\n\nA few things to keep in mind:\n\n1. the resulting SVG may be **very large** and unsuitable\nto be stored/shared online, due to the fact this library stores all image contents in the SVG. To resolve it,\nyou can use libraries such as [`cairosvg`](https://cairosvg.org/documentation/) to convert your SVG into PNG or JPEG files.\n2. The avatars in the gallery are sorted by contributions at the time\nthe library is querying Github API.\n3. The generated avatars are clickable and links to each contributor's Github\nprofile page. However, once you convert it into PNG or JPEG, the links\nwill get lost.\n\nThank you and feel free to submit an issue if you find any. Also welcome to submit a PR to improve it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexwangcc%2Fgithub-avatars-gallery-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frexwangcc%2Fgithub-avatars-gallery-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexwangcc%2Fgithub-avatars-gallery-generator/lists"}