Statistic images for your profile, with stats from private repos too
[CI] Stats generator 8edc311406 [CI] Update stats (23.01.2025 00:06) [SKIP CI] | 1 dag sedan | |
---|---|---|
generated | 1 dag sedan | |
templates | 10 månader sedan | |
.gitattributes | 10 månader sedan | |
.gitignore | 10 månader sedan | |
.woodpecker.yaml | 2 dagar sedan | |
LICENSE | 10 månader sedan | |
README.md | 8 månader sedan | |
colors.json | 10 månader sedan | |
main.py | 2 veckor sedan | |
requirements.txt | 10 månader sedan | |
users.json | 10 månader sedan |
Generate visualizations of Forgejo / Gitea user and repository statistics with Python - e.g. using Forgejo / Gitea Actions. Visualizations can include data for private repositories.
You can choose between light and dark mode.
Codeberg · repo.or.cz (mirror) · NotABug.org (mirror)
When someone views a profile, it is often because they are curious about a user's open source projects and contributions. Unfortunately, that user's stars, forks, and pinned repositories do not necessarily reflect the contributions they make.
This project aims to collect a variety of profile and repository statistics using the Forgejo / Gitea API. It then generates images that can be displayed in repository READMEs, or in a user's Profile README.
There are many GitHub statistics visualizations for GitHub. But also at Forgejo or Gitea some are interested in the number of stars of a user, the most used programming languages or the changed lines.
This project is still under development, but it's a good start. It is already possible to create simple visualizations.
This project uses GitHub stats by Jacob Strieb (licensed under GPL 3.0 or later) as base and uses the Language Colors by OZH (licensed under WTFPL) for the language color visualizations.
Since the project runs on Forgejo / Gitea Actions, no server is required to regularly regenerate the images with updated statistics. Likewise, since the user runs the analysis code themselves via Forgejo / Gitea Actions, they can use their access token to collect statistics on private repositories that an external service would be unable to access.
Read - repository
and Read - user
. Copy the access token when it is generated – if you lose it, you will have to regenerate the token.Read & write - repository
Git content (Defalt branch)
. This will create a new copy of this repo. Note: this is not the same as forking a copy because it copies everything fresh without the huge commit history.Secrets
.git_url
- e.g. https://codeberg.org
user
- e.g. Tuxilio
access_token
- Your access token generated in step 1commit_token
- Your access token generated in step 2
The tokens need the events Cron
and if you want to run it manual Manual
generated
folder. If all looks right, you're nearly done!@daily
to run the workflow each day at midnight.username
value to your Forgejo / Gitea username.
md
<div align="center">
<a href="https://codeberg.org/username/forgejo-stats">
<img src="https://codeberg.org/username/forgejo-stats/media/branch/main/generated/overview.svg"/>
<img src="https://codeberg.org/username/forgejo-stats/media/branch/main/generated/languages.svg"/>
</a>
</div>
You're done! 🎉
If something has gone wrong, check everything again carefully. If it still doesn't work, please open an issue.
First, install requests:
pip install requirements.txt
Now you can run the main program:
python3 main.py
There are a few things you can do to support the project:
These things motivate me to to keep sharing what I build, and they provide validation that my work is appreciated! They also help me improve the project. Thanks in advance!