About this project
RepositoryScanner is a GitHub account analyzer that uses the GitHub API to read language statistics from public and private repositories, then exports an SVG card of top languages. According to the README, GitHub’s language API returns bytes of code per language, and the card’s percentages are based on those byte-based sizes rather than raw line counts. The generated card shows the top six languages by total code size and contribution statistics: total contributions, current streak, and longest streak. It uses a Kanagawa paper-ink-inspired theme and is designed to update automatically every week through GitHub Actions.
The recommended setup is to fork the repository, create a GitHub personal access token with repo and read:user scopes (or public_repo if only public repositories matter), add repository secrets for GH_TOKEN, GITHUB_USERNAME, and optionally EXCLUDED_LANGS, then run the Update Language Stats workflow manually once. The workflow file is located at .github/workflows/update-chart.yaml and is configured to run weekly on Sunday at 00:00 UTC, commit the updated assets/languages.svg back to main, and also support on-demand runs. The schedule can be changed by editing the cron line in that workflow file. The resulting SVG can be embedded in a profile README using a raw.githubusercontent.com URL, with an optional query parameter such as ?v=1 to bypass browser caching.
For local development, the README recommends Python 3.10+ with 3.11 preferred. Core dependencies are requests and python-dotenv. Configuration can be provided through a .env file or shell environment variables. Running python scripts/fetch_languages.py from the repository root generates assets/languages.svg. The Kanagawa color palette and per-language colors are defined in scripts/colors.py, while SVG layout details are handled inside scripts/fetch_languages.py. The README also notes that GITHUB_USERNAME is the main variable, but USERNAME is supported for backwards compatibility. If GH_TOKEN is not set, only public repositories are analyzed and GitHub’s unauthenticated rate limits apply.
Security and privacy notes state that the tool uses the GitHub API to read the repository list and language statistics per repository, but does not read actual code content. Tokens are read from local .env or environment variables for local development and from GitHub Secrets for Actions, and should never be committed. Troubleshooting sections cover 401 Unauthorized and API errors, missing language data due to filtered forks, excluded languages, token access, or rate limits, and workflows not running because Actions are disabled, the workflow path is wrong, YAML is invalid, or changes are not on the expected branch. The project is MIT licensed and states that it was inspired by anuraghazra/github-readme-stats, with the Kanagawa color theme influenced by rebelot/kanagawa-paper.nvim.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.