{"id":50763254,"url":"https://github.com/profile-icons/github-stats-modified","last_synced_at":"2026-06-11T12:02:13.320Z","repository":{"id":360444639,"uuid":"1248388253","full_name":"profile-icons/github-stats-modified","owner":"profile-icons","description":"Better GitHub statistics images for your profile, with stats from private repos too. Modification of 'jstrieb/github-stats' to visualize language stats by line changes with wider SVG, support portable dark-mode and i18n, display traffic (views + clones) stats, and update once weekly.","archived":false,"fork":false,"pushed_at":"2026-06-04T03:48:06.000Z","size":87,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-04T05:25:06.218Z","etag":null,"topics":["contributions","dark-mode","forks","git-scraping","github","github-actions","github-api","hacktoberfest","i18n","images","languages","profile","readme-md","readme-template","stars","statistics","stats","traffic","visualizations","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/profile-icons.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-24T15:23:00.000Z","updated_at":"2026-05-27T10:57:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/profile-icons/github-stats-modified","commit_stats":null,"previous_names":["profile-icons/git-stats","profile-icons/github-stats-modified"],"tags_count":0,"template":true,"template_full_name":"jstrieb/github-stats","purl":"pkg:github/profile-icons/github-stats-modified","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profile-icons%2Fgithub-stats-modified","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profile-icons%2Fgithub-stats-modified/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profile-icons%2Fgithub-stats-modified/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profile-icons%2Fgithub-stats-modified/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/profile-icons","download_url":"https://codeload.github.com/profile-icons/github-stats-modified/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/profile-icons%2Fgithub-stats-modified/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34197394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["contributions","dark-mode","forks","git-scraping","github","github-actions","github-api","hacktoberfest","i18n","images","languages","profile","readme-md","readme-template","stars","statistics","stats","traffic","visualizations","zig"],"created_at":"2026-06-11T12:02:12.575Z","updated_at":"2026-06-11T12:02:13.314Z","avatar_url":"https://github.com/profile-icons.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [GitHub Stats Visualization](https://github.com/jstrieb/github-stats)\n\n![](https://raw.githubusercontent.com/profile-icons/github-stats-modified/refs/heads/generated/overview.svg)\n![](https://raw.githubusercontent.com/profile-icons/github-stats-modified/refs/heads/generated/languages.svg)\n\nGenerate visualizations of GitHub user and repository statistics with GitHub\nActions. Visualizations can include data from private repositories, and from\nrepositories you have contributed to, but do not own.\n\n\u003e A modification of [jstrieb/github-stats](https://github.com/jstrieb/github-stats):\n\n* optionally visualize language stats by line changes\n   * backup: line changes weighted by repo language byte share estimation\n* support portable dark-mode and [i18n](https://github.com/profile-icons/github-stats-modified/issues/1)\n* widen `languages.svg` to use excess `README.md` space and list more language stats\n* display all traffic (views + clones) stats\n* update once weekly\n\n## Background\n\nWhen someone views a GitHub profile, it is often because they are curious about\nthe user's open-source contributions. Unfortunately, that user's stars, forks,\nand pinned repositories do not necessarily reflect the contributions they make\nto private repositories. The data likewise does not present a complete picture\nof the user's total contributions beyond the current year.\n\nThis project aims to collect a variety of profile and repository statistics\nusing the GitHub API. It then generates images that can be displayed in\nrepository READMEs, or in a user's [Profile\nREADME](https://docs.github.com/en/github/setting-up-and-managing-your-github-profile/managing-your-profile-readme).\nIt also dumps all statistics to a JSON file that can be used for further data\nanalysis.\n\nSince this project runs on GitHub Actions, no server is required to regularly\nregenerate the images with updated statistics. Likewise, since the user runs the\nanalysis code themselves via GitHub Actions, they can use their GitHub access\ntoken to collect statistics on private repositories that an external service\nwould be unable to access.\n\n\n## Disclaimer\n\nThe GitHub statistics API returns inaccurate results in some situations:\n\n- Total lines of code modified may be too high or too low\n  - GitHub counts changes to files like `package-lock.json` that may inflate the\n    line count in surprising ways\n  - On the other hand, GitHub refuses to count lines of code for repositories\n    with more than 10,000 commits, so contributions to those will not be\n    reflected in the data at all\n  - [The GitHub API endpoint for computing contributor statistics no longer\n    works reliably](https://github.com/orgs/community/discussions/192970), so we\n    fall back on computing the statistics ourselves by cloning each repository\n    locally and tallying lines changed with the `git` CLI\n    - Our computed totals likely under-count relative to GitHub's, since theirs\n      correctly attribute authorship for contributions to pull requests with\n      several authors that end up squashed and merged by just one author\n    - They also correctly attribute commits we may miss if they are made with\n      old email addresses no longer connected to the account\n- Repository view count statistics often seem too low, and many referring sites\n  are not captured\n  - If you lack permissions to access the view count for a repository, it will\n    be tallied as zero views – this is common for external repositories where\n    your only contribution is making a pull request\n- Only repositories with commit contributions are counted, so if you only open\n  an issue on a repo, it will not show up in the statistics\n  - Repos you created and own may not be counted if you never commit to them, or\n    if the committer email is not connected to your GitHub account\n\nIf the calculated numbers seem strange, run the CLI locally and dump JSON output\nto determine which repositories are skewing the statistics in unexpected ways.\nSee [below](#analyzing-the-data) for tips.\n\n\n## Installation\n\nTo make your own statistics images: make a copy of this repository, make a\nGitHub API token, add the token to the repository, run the Actions workflow,\nand retrieve the images.\n\n1. [Make a \"**classic**\" personal access token with `read:user`, `user:email`,\n   and `repo`\n   permissions.](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)\n   1. [Navigate to the personal access tokens (classic)\n      page.](https://github.com/settings/tokens) Open that link in a new tab, or\n      proceed with the steps below.\n      1. Click your avatar in the top right corner, then \"Settings\" on the menu\n         that drops down.\n      1. Click \"Developer settings\" from the menu on the left.\n      1. Click \"Personal access tokens\", then \"Tokens (classic)\" from the menu\n         on the left.\n   1. Click \"Generate new token\" in the top right, then \"Generate new token\n      (classic)\" in the menu that drops down.\n   1. Set the expiration date to \"none\" (unless you want to periodically\n      regenerate this token).\n   1. Check `read:user`, `user:email`, and `repo` permissions.\n      - `read:user` and `repo` permissions are necessary for reading user and\n        repository metadata to calculate statistics.\n      - `user:email` permission is necessary for correctly attributing commits\n        to the user when cloning repositories locally to compute lines of code\n        changed.\n   1. Click the green \"Generate token\" button at the bottom.\n   1. **Copy the token and save it somewhere.** If you lose it, you will not be\n      able to access it again, and will have to regenerate a new one. I keep\n      mine saved along with the GitHub entry in my password manager.\n   1. Some users report that it can take some time for the personal access token\n      to take effect. For more information, see\n      [#30](https://github.com/jstrieb/github-stats/issues/30).\n1. Create a copy of this repository by clicking\n   [here](https://github.com/jstrieb/github-stats/generate).\n   - Equivalently, click the big, green \"Use this template\" button at the top\n     left of the page, then click \"Create a new repository.\"\n   - Note: this is **not** the same as forking a copy because it copies\n     everything fresh, without the huge commit history.\n1. Create a new repository secret named `ACCESS_TOKEN` with your personal access\n   token from the first step.\n   1. [Go to the \"New secret\" page for your copy of this repository by clicking\n      this link.](../../settings/secrets/actions/new)\n      - If the link doesn't work, try clicking it from your copy of this\n        repository.\n      - Alternatively, go to the page manually.\n        1. Click \"Settings\" for your copy of this repository.\n        1. Click \"Secrets and variables\" on the left, then \"Actions\" from the\n           menu that drops down.\n        1. Click the green \"New repository secret\" button on the \"Actions\n           secrets and variables\" page.\n   1. Name your secret `ACCESS_TOKEN`.\n   1. Paste your personal access token from step 1 into the large \"Secret\" text\n      box.\n1. (Optional) Make other secrets for more configuration.\n   - To exclude some repositories from the aggregate statistics, add them\n     (separated by commas) to a secret called `EXCLUDE_REPOS`.\n     - To prevent your copy of this repository from showing up in your\n       statistics, add the name of your copy of the repo to this list.\n   - To exclude some languages from the aggregate statistics, add them\n     (separated by commas) to a secret called `EXCLUDE_LANGS`.\n     - The languages are case insensitive, and can include spaces.\n     - Language names can be found either in a [local stats file generated by\n       the CLI](#list-languages), or in the [list used by GitHub\n       linguist](https://github.com/github-linguist/linguist/blob/537297cdae3ab05f8d5dd1c03627a5bd73707b19/lib/linguist/languages.yml)\n       (which powers their language analysis on the back end).\n   - To aggregate language statistics based directly on line changes from commit logs, add `true` to a secret called `IS_LOCAL`.\n   - Lists for `EXCLUDE_REPOS` and `EXCLUDE_LANGS` can use globbing patterns.\n     For example, to exclude all repos by user \"jstrieb\", add `jstrieb/*` to\n     `EXCLUDE_REPOS`.\n   - These can also be set directly in [the Actions\n     workflow](.github/workflows/main.yml), but you should set them as secrets\n     if you want to keep the repository names or languages private.\n   - Other configuration options can be set as environment variables or command\n     line arguments by directly editing [the Actions\n     workflow](.github/workflows/main.yml).\n1. Go to the [Actions\n   page](../../actions?query=workflow%3A\"Generate+Stats+Images\") and click \"Run\n   Workflow\" on the right side of the screen to generate images for the first\n   time.\n   - They automatically regenerate every 24 hours, but they can be manually\n     regenerated by running the workflow this way.\n1. Take a look at the images that have been created on the [`generated`\n   branch](tree/generated/).\n   - The [`overview.svg`](tree/generated/overview.svg) file.\n   - The [`languages.svg`](tree/generated/languages.svg) file.\n1. To add the statistics to your GitHub profile README, copy and paste the\n   following lines of code into your markdown content.\n   - Replace `[USERNAME]` in the links below with your own username.\n   ``` markdown\n   ![](https://raw.githubusercontent.com/[USERNAME]/github-stats-modified/refs/heads/generated/overview.svg)\n   ![](https://raw.githubusercontent.com/[USERNAME]/github-stats-modified/refs/heads/generated/languages.svg)\n   [Modification of `jstrieb/github-stats`.](https://github.com/jstrieb/github-stats)\n   ```\n1. Star this repo if you like it!\n\n\n## Analyzing the Data\n\nUsing the `github-stats` CLI (available on the\n[releases](https://github.com/jstrieb/github-stats/releases/latest) page) to\nrun locally, you can dump raw statistics data to a JSON file using the\n`--json-output-file` command-line argument. \n\n``` bash\n# Instructions for Linux. Change the filename at the end of the URL for macOS.\nsudo curl \\\n    --location \\\n    --output '/usr/local/bin/github-stats' \\\n    'https://github.com/jstrieb/github-stats/releases/latest/download/github-stats_x86_64-linux'\nsudo chmod +x /usr/local/bin/github-stats\n\ngithub-stats --version\n\ngithub-stats --access-token [YOUR API KEY] --json-output-file stats.json --debug\n```\n\nThen, you can import the JSON file into your programming language of choice and\nstart analyzing. My preference is to use [`jq`](https://github.com/jqlang/jq)\nfrom the command line. The examples below assume the JSON file is stored in\n`stats.json`.\n\n\n### List All\n\nList all repositories, sorted with most-viewed at the bottom.\n\n``` bash\njq '.repositories | sort_by(.views) | del(.[].languages)' stats.json\n```\n\nIn that command, replace `.views` with any other field name (such as\n`.lines_changed` or `.stars`) to sort by that field instead. The command\nremoves the languages field (using `del()`) because it can clutter the output,\nmaking it hard to read.\n\n\n### List Languages\n\nList all languages, sorted with most-used at the bottom.\n\n``` bash\njq --raw-output '\n  [.repositories[].languages[]] \n    | group_by(.name) \n    | sort_by([.[].size] | add) \n    | .[] \n    | \"\\(.[0].name): \\([.[].size] | add)\"\n' stats.json\n```\n\n\n## Support the Project\n\nIf this project is useful to you, please support it!\n\n- Star the repository (and follow me on GitHub for more)\n- Share and upvote on sites like Twitter, Reddit, and Hacker News\n- Report any bugs, glitches, or errors that you find\n- [Check out my other projects](https://jstrieb.github.io/projects/)\n\nThese things motivate me to keep sharing what I build, and they provide\nvalidation that my work is appreciated! They also help me improve the project.\nThanks in advance!\n\nIf you are insistent on spending money to show your support, I encourage you to\ninstead make a generous donation to one of the following organizations.\n\n- [Electronic Frontier Foundation](https://supporters.eff.org/donate/)\n- [Signal Foundation](https://signal.org/donate/)\n- [Mozilla](https://donate.mozilla.org/en-US/)\n- [The Internet Archive](https://archive.org/donate/index.php)\n\n\n## Project Status\n\nThis project is actively maintained, but not actively developed. In other\nwords, I will fix bugs, but will rarely add features (if at all). If there are\nno recent commits, it means that everything has been running smoothly!\n\nGitHub's APIs often have unexpected errors, downtime, and strange,\nintermittent, undocumented behavior. Issues generating statistics images often\nresolve themselves within a day or two, without any changes to this code or\nrepository.\n\nIf you want to contribute to the project, please open an issue and discuss\nfirst. Pull requests that are not discussed with me ahead of time may be\nignored. It's nothing personal, I'm just busy, and reviewing others' code is\nnowhere near as fun as working on other projects.\n\nEven if something were to happen to me, and I could not continue to work on the\nproject, it will continue to work as long as the GitHub API endpoints it uses\nremain active and unchanged.\n\n\n## Related Projects\n\n- Inspired by a desire to improve upon\n  [anuraghazra/github-readme-stats](https://github.com/anuraghazra/github-readme-stats)\n- Uses [GitHub Octicons](https://primer.style/octicons/) to precisely match the\n  GitHub UI\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofile-icons%2Fgithub-stats-modified","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprofile-icons%2Fgithub-stats-modified","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprofile-icons%2Fgithub-stats-modified/lists"}