{"id":18864892,"url":"https://github.com/joedf/github-badge-2","last_synced_at":"2025-04-14T13:21:42.064Z","repository":{"id":68166151,"uuid":"281577339","full_name":"joedf/github-badge-2","owner":"joedf","description":"simpler fork of github-badge","archived":false,"fork":false,"pushed_at":"2025-04-10T01:21:37.000Z","size":91,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T02:36:47.280Z","etag":null,"topics":["badge","github","webapp","widget"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joedf.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-22T04:48:20.000Z","updated_at":"2024-10-30T22:05:25.000Z","dependencies_parsed_at":"2023-12-05T02:23:58.652Z","dependency_job_id":"8ca20d52-28a5-40bf-bff7-68577cd280e4","html_url":"https://github.com/joedf/github-badge-2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joedf%2Fgithub-badge-2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joedf%2Fgithub-badge-2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joedf%2Fgithub-badge-2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joedf%2Fgithub-badge-2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joedf","download_url":"https://codeload.github.com/joedf/github-badge-2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886334,"owners_count":21177645,"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":["badge","github","webapp","widget"],"created_at":"2024-11-08T04:44:22.373Z","updated_at":"2025-04-14T13:21:42.037Z","avatar_url":"https://github.com/joedf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# github-badge-2\n \nSimpler implementation, utilizing GitHub's GraphQL API, and fork of:  \nhttps://github.com/berkerpeksag/github-badge\n\n## Setup\n### Option 1 - Self-Hosted\nSimply update `config.json` with your username and github api_key that has user repo read access and user activity. Run the `generate_badge.py` script with python v3.4+, with `jinja2` and `requests` installed.\n\nThen, set up a cron job or whatever you can use for a recurring / scheduled tasks to run the script periodically (something like every 24hrs) to update the generated `badge.html`. Or you can setup a free jinja webapp like on [pythonanywhere.com](https://pythonanywhere.com/) and simply check if the generated html exists or if modified date of the html file is greater than 1 day, see [example script](https://gist.github.com/joedf/84279ff7647d554a9d15f280a209c6b7).\n\nRemember to set permissions to deny requests all files other than the generated html file.\n\n### Option 2 - GitHub Actions \u0026 Pages\nFor GitHub Actions with GitHub Pages, see [update-badge-html.yml](.github/workflows/update-badge-html.yml) for example usage. You will need to add a GitHub token as `GH_BADGE_TOKEN` in the repository secrets. You will also need to set the GitHub Pages repository setting to use the `gh-pages` branch. You will likely want to add repositories with automated commits to main/default branches in `ignore_repos` in `config.json` to prevent said automated commits from being considered. Otherwise, the latest commit for those repositories may be considered the last automated commit (depending on your configuration) and not any commit by the actual user. So, the recent changes link presented in the widget may be point to potentially unwanted said commits.\n\n## Usage\nYou can then include the widget with the following code in similar form to:\n```html\n\u003ciframe src=\"https://MyWebsite.com/badge.html\" style=\"border:0;height:128px;width:200px;overflow:hidden;\" frameBorder=\"0\"\u003e\u003c/iframe\u003e\n```\n\n## Dark theme / Night mode\nYou can use the dark theme by specifying `class=\"dark\"` on `\u003cbody\u003e` in the html template. Or you can add `?theme=dark` to the end of the URL used for the `iframe`.\n\n## Preview\n![Light theme](preview.png) ![Dark theme](preview.dark.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoedf%2Fgithub-badge-2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoedf%2Fgithub-badge-2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoedf%2Fgithub-badge-2/lists"}