https://github.com/ridemountainpig/github-stats-json-style
Readme Github Stats with Json style :octocat:
https://github.com/ridemountainpig/github-stats-json-style
github-actions github-stats json-style
Last synced: 8 months ago
JSON representation
Readme Github Stats with Json style :octocat:
- Host: GitHub
- URL: https://github.com/ridemountainpig/github-stats-json-style
- Owner: ridemountainpig
- Created: 2024-02-21T09:17:13.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-21T09:24:04.000Z (about 2 years ago)
- Last Synced: 2025-07-08T05:04:35.865Z (8 months ago)
- Topics: github-actions, github-stats, json-style
- Language: Python
- Homepage: https://github.com/marketplace/actions/github-stats-json-style
- Size: 1.95 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Github Stats Json Style
## Introduction
This is a simple Github Stats Json Style for your Readme.
## Usage
1. Write your Readme content in the `TEMPLATE.md` file.
2. Place the `{{github_json_stats}}` tag where you want the Github Stats to appear in your Readme.
3. Create a new workflow file in your `.github/workflows` directory.
4. Add the following code to the workflow file, and replace `YOUR_GITHUB_USERNAME` with your Github username and `THE_BRANCH_YOU_WANT_TO_PUSH_TO` with the branch you want to push the stats to. This will generate the Github Stats Json and push it to the specified branch in your repository.
```yml
name: Generate Github Json Stats
on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
jobs:
generate-readme:
runs-on: macos-14
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Github Stats Json Style
uses: ridemountainpig/github-stats-json-style@v1.0.0
with:
username: YOUR_GITHUB_USERNAME
push-branch: THE_BRANCH_YOU_WANT_TO_PUSH_TO
```
## Example
[TEMPLATE.md Example](TEMPLATE.md)
```json
{
"Yen Cheng Lin's GitHub Stats, Rank: A": {
"Total Stars Earned": "92 ⭐️",
"Total Commits in 2024": "625 🔥",
"Total PRs": "155 🚀",
"Total Issues": "61 📬",
"Contributed to (last year)": "16 🤝"
}
}
```