wakawaka-action
ActionsTags
(2)Wakawaka - Coding Stats GitHub Action is a simple and easy-to-use GitHub Action. WakaTime, allows developers to access and display their coding activity data in various visual formats. Whether you want to show coding stats as badges or generate rich charts to display your activity, this action can do it all. You can use the generated output directly on your GitHub profile.
- Stats: Generate shield badges for various coding stats.
- Charts: Visualize coding activity data in different chart formats including bar charts, pie charts, and more.
- Customization: Customize the type and range of charts and badges to suit your needs.
The action interacts with this WakaTime API Wrapper to retrieve data from your WakaTime account. It fetches your coding stats and generates dynamic charts and badges based on this data. These charts and badges are then displayed directly in your GitHub profile or any markdown-supported platform.
- Authentication: You provide your WakaTime
username
andauth_token
. The action uses these to access your WakaTime data. - Data Retrieval: The action makes requests to the wrapper's API endpoints to retrieve data based on your specified parameters (e.g., stat type, chart type, and etc). Refer to Wakawaka API docs to know more.
- Chart Generation: The APIs can generate different types of charts such as bar charts, pie charts, and doughnut charts, depending on the data you wish to display.
- Badge Creation: The APIs can also create shield-style badges that can be added to your README to highlight your activity.
- Display: Once the charts and badges are generated, the action updates your GitHub profile with the visual content.
Before you can use the Wakawaka GitHub Action, you’ll need the following:
- A WakaTime account (sign up at WakaTime).
- Your WakaTime API token: You can get this token by visiting this aayushgoyal - Wakawaka.
NOTE: Once you have generated the toke, copy and save it as you will need it later.
- Add the Action to Your GitHub Repository: Add the following YAML snippet to your repository's
.github/workflows
folder (e.g.,update-wakastats.yml
):
name: WakaTime Readme
on:
schedule:
- cron: "30 18 * * *" # Runs everyday 12AM IST.
push:
branches:
- "**"
jobs:
waka_waka_job:
runs-on: ubuntu-latest
name: A job to update Wakatime stats in README.
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Wakawaka Action
uses: aayush-goyal/[email protected]
with:
COMMIT_EMAIL: "your_primary_email_with_GitHub"
GH_ACTOR: ${{ github.actor }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_WORKSPACE: ${{ github.workspace }}
WAKA_AUTH_TOKEN: ${{ secrets.WAKATIME_API_KEY }} #API token you saved earlier.
WAKA_USERNAME: "your_wakatime_username"
-
Set Up Secrets: In your GitHub repository, navigate to
Settings > Secrets
and add the following secrets:WAKATIME_API_KEY
: Your WakaTime API token.
Your action is now ready to use on your GitHub README profile. All you need to is to use special Markdown comments to start customizing the profile.
Wakawaka works with special comments you define in the Markdown README file. To tell Wakawaka to insert either a stat or a chart you need three comments one after another on separate lines as shown below:
<!-- WAKAWAKA_START -->
<!-- WAKAWAKA_CONFIG__OPTION --> [1]
<!-- WAKAWAKA_END -->
Currently, Wakawaka supports only two types of badges:
-
Best Coding Day
Replace
[1]
with<!-- WAKAWAKA_CONFIG__STATS_BEST_DAY -->
Wakawaka will automatically get the badge and insert it just below the [1] comment in your README file.
-
Daily Coding Average
Replace
[1]
with<!-- WAKAWAKA_CONFIG__STATS_DAILY_AVG -->
You can do a lot more when it comes to charts on Wakawaka.
The basic comment for customizing the chart is as follows:
Replace [1]
with
<!-- WAKAWAKA_CONFIG__ST={st_digit}&CT={ct_digit}&DT={dt_digit}&R={range_digit} -->
Here is the breakdown of all the digits you can pass to this customization comment for generating beautiful charts on your GitHub Readme profile.
0
→ Programming Languages1
→ Categories2
→ Editors3
→ OS4
→ Projects
0
→ Bar Chart Horizontal1
→ Bar Chart Vertical2
→ Doughnut Chart3
→ Nightingale Chart4
→ Pie Chart
0
→ Percent1
→ Time
0
→ Last 7 Days1
→ Last 30 Days2
→ Last 6 Months3
→ Last Year4
→ All Time
Based on the combinations you can generate almost all the kind of charts you would need based on your coding stats. For example, let us assume a programmer wants to display his editor stats in a doughnut chart, but only for the last 30 days. Here is the config comment he needs to put in his README file:
<!-- WAKAWAKA_START -->
<!-- WAKAWAKA_CONFIG__ST=2&CT2=&DT0=&R=1 -->
<!-- WAKAWAKA_END -->
You can also visit Wakawaka - API repo to learn more about the APIs the action uses behind the scenes and to play with them.
Here’s a look at some of the exciting features I plan to implement in the future:
- More chart types: Add more types of charts (e.g., line charts, stacked bar charts, etc.).
- More stats: More stats from your coding activity like time when you are most coding, your best month for coding, and etc.
- Customization options: Provide more options for customizing the appearance and behavior of charts and badges (e.g., colors, sizes, themes).
- Integration with other platforms: Extend the functionality to support more platforms like GitLab, Bitbucket, etc.
- Enhanced data analytics: Provide deeper insights into your coding activities, such as trends over time, comparison between projects, etc.
If you want to contribute to the project, please read CONTRIBUTING.
This project is licensed under the MIT License - see the LICENSE file for details.
For further questions, feel free to reach out via GitHub Discussions.
Let me know if you want further customization or any additional sections!
wakawaka-action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.