Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liby/recent-languages-box
💻 Update a pinned gist to contain languages of your recent commits in GitHub
https://github.com/liby/recent-languages-box
gists github github-pro linguist pinned-gist
Last synced: 26 days ago
JSON representation
💻 Update a pinned gist to contain languages of your recent commits in GitHub
- Host: GitHub
- URL: https://github.com/liby/recent-languages-box
- Owner: liby
- Created: 2024-08-13T19:24:46.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-17T08:11:18.000Z (3 months ago)
- Last Synced: 2024-08-17T10:28:00.078Z (3 months ago)
- Topics: gists, github, github-pro, linguist, pinned-gist
- Language: TypeScript
- Homepage: https://gist.github.com/liby/914dd217cecdc3bf27960be421c95850
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-pinned-gists - recent-languages-box - A TypeScript + Bun rewrite of lang-box that updates a pinned gist with your recent GitHub commit language statistics. It offers improved type safety, customizability, and uses a more scientific approach to sorting languages. (GitHub)
README
# Recent Languages Box
> ✨ Inspired by [lang-box](https://github.com/inokawa/lang-box)
>
> 📌 For more pinned-gist projects, check out: [awesome-pinned-gists](https://github.com/matchai/awesome-pinned-gists)This project analyzes your recent GitHub commits using the GitHub API and [Linguist](https://github.com/github-linguist/linguist) to display the percentage of each programming language used. It also calculates the number of lines added/removed per language.
## [Preview](https://gist.github.com/liby/914dd217cecdc3bf27960be421c95850)
## Setup Guide
### 1. Create a GitHub Gist
1. Go to [https://gist.github.com/](https://gist.github.com/) and create a new public gist.
2. Name the file (e.g., "Recent Coding Languages") and add a description (e.g., "💻 Recent GitHub Activity Languages").
### 2. Generate a GitHub Token
1. [Create a new Personal Access Token](https://github.com/settings/personal-access-tokens/new)
2. Configure repository access:
- For public repositories:Select **"Public Repositories (read-only)"**
- For all repositories: Select **"All repositories"**
- For specific repositories:
1. Choose **"Only select repositories"**
2. Select the desired repositories from the list
3. Configure permissions:
- Repository permissions > Metadata: Read-only
- When selecting **"Public Repositories (read-only)"** no configuration is required.
- Account permissions > Gists: Read and write
3. Generate and copy the token for use in the next steps.
Note: Ensure you save the token securely, as it won't be displayed again.
### 3. Set Up the Project
1. Fork this repository or create a new one using the [template](https://github.com/new?template_name=recent-languages-box&template_owner=liby).2. Ensure GitHub Actions are enabled for your repository.
3. Go to repository **Settings** > **Security** > **Actions secrets and variables** > **Secrets**, add the following environment variables:
- `GH_TOKEN`: The GitHub token generated above.
4. Go to repository **Settings** > **Security** > **Actions secrets and variables** > **Variables**, add the following environment variables:
- `GIST_ID`: The ID of your gist (e.g., `914dd217cecdc3bf27960be421c95850` from https://gist.github.com/liby/914dd217cecdc3bf27960be421c95850)
### 4. Pin the Gist to Your Profile
Follow GitHub's guide on [pinning items to your profile](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/pinning-items-to-your-profile) to display your language stats.