Top Related Projects
This GitHub action helps to add cool dev metrics to your github profile Readme
📊 A minimalist, self-hosted WakaTime-compatible backend for coding statistics
📊 Update a pinned gist to contain your weekly WakaTime stats
🚀 Level up your GitHub profile readme with customizable cards including LOC statistics!
😎 A curated list of awesome GitHub Profile which updates in real time
Quick Overview
Waka-readme is a GitHub Action that automatically updates your GitHub profile README with your weekly WakaTime stats. It fetches your coding activity data from WakaTime and displays it in a visually appealing format, allowing you to showcase your programming habits and languages used.
Pros
- Easy to set up and integrate with your GitHub profile
- Automatically updates your README with fresh stats
- Customizable display options for the WakaTime stats
- Supports various programming languages and IDEs
Cons
- Requires a WakaTime account and API key
- May not be suitable for users who prefer not to share detailed coding activity
- Limited to weekly stats, no option for longer time periods
- Depends on GitHub Actions, which may have usage limits
Getting Started
- Fork the waka-readme repository
- Create a WakaTime account and obtain your API key
- Add the following section to your GitHub profile README:
<!--START_SECTION:waka-->
<!--END_SECTION:waka-->
- Create a new workflow file (e.g.,
.github/workflows/waka-readme.yml
) with the following content:
name: Waka Readme
on:
schedule:
# Runs at 12am IST
- cron: '30 18 * * *'
workflow_dispatch:
jobs:
update-readme:
name: Update Readme with Metrics
runs-on: ubuntu-latest
steps:
- uses: anmol098/waka-readme-stats@master
with:
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- Add your WakaTime API key as a secret in your GitHub repository settings
- Commit and push the changes to trigger the workflow
Your GitHub profile README will now be automatically updated with your WakaTime stats.
Competitor Comparisons
This GitHub action helps to add cool dev metrics to your github profile Readme
Pros of waka-readme-stats
- More comprehensive statistics, including language breakdown and coding activity
- Customizable themes and layout options
- Supports multiple version control platforms (GitHub, GitLab, Bitbucket)
Cons of waka-readme-stats
- More complex setup process
- Requires more configuration and maintenance
- Potentially slower update times due to increased data processing
Code Comparison
waka-readme:
name: Waka Readme
on:
schedule:
- cron: '0 0 * * *'
jobs:
update-readme:
name: Update Readme with Metrics
runs-on: ubuntu-latest
steps:
- uses: athul/waka-readme@master
with:
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
waka-readme-stats:
name: Waka Readme
on:
schedule:
- cron: '30 18 * * *'
workflow_dispatch:
jobs:
update-readme:
name: Update Readme with Metrics
runs-on: ubuntu-latest
steps:
- uses: anmol098/waka-readme-stats@master
with:
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
SHOW_OS: "True"
SHOW_PROJECTS: "True"
The waka-readme-stats configuration offers more options for customization and data display, while waka-readme has a simpler setup with fewer configuration options.
📊 A minimalist, self-hosted WakaTime-compatible backend for coding statistics
Pros of wakapi
- Self-hosted solution, offering more control over data and privacy
- Provides a web interface for viewing statistics and generating reports
- Supports multiple users and organizations
Cons of wakapi
- Requires more setup and maintenance compared to waka-readme
- May have higher resource requirements due to self-hosting
Code comparison
waka-readme:
name: Waka Readme
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update-readme:
name: Update Readme with Metrics
runs-on: ubuntu-latest
steps:
- uses: athul/waka-readme@master
with:
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
wakapi:
func (api *APIClient) GetSummary(start, end time.Time) (*Summary, error) {
url := fmt.Sprintf("%s/api/summary?start=%s&end=%s", api.BaseURL, start.Format(time.RFC3339), end.Format(time.RFC3339))
req, err := http.NewRequest("GET", url, nil)
if err != nil {
return nil, err
}
// ... (additional code)
}
The waka-readme example shows a GitHub Actions workflow configuration, while the wakapi example demonstrates a Go function for retrieving summary data from the API. This reflects the different approaches of the two projects: waka-readme focuses on GitHub integration, while wakapi provides a more comprehensive self-hosted solution with its own API.
📊 Update a pinned gist to contain your weekly WakaTime stats
Pros of waka-box
- Displays coding stats in a GitHub gist, which can be pinned to your profile
- Provides a visual representation of coding time with bar graphs
- Easier to set up and maintain as it uses GitHub Actions
Cons of waka-box
- Limited customization options for the displayed information
- Requires a separate gist to be created and maintained
- May not update as frequently as waka-readme
Code Comparison
waka-box:
- name: Update gist
uses: matchai/waka-box@master
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GIST_ID: ${{ secrets.GIST_ID }}
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
waka-readme:
- uses: athul/waka-readme@master
with:
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
SHOW_TITLE: true
Summary
Both waka-box and waka-readme are useful tools for displaying WakaTime coding statistics on GitHub profiles. waka-box offers a more visual representation in a pinned gist, while waka-readme provides greater flexibility by updating the README directly. The choice between the two depends on personal preference for display style and desired level of customization.
🚀 Level up your GitHub profile readme with customizable cards including LOC statistics!
Pros of github-trends
- Provides more comprehensive GitHub statistics, including language usage and contribution patterns
- Offers customizable visualization options for displaying trends
- Supports multiple time ranges for analyzing GitHub activity
Cons of github-trends
- More complex setup and configuration process
- Requires additional dependencies and API access
- May have higher resource usage due to more extensive data processing
Code Comparison
waka-readme:
import re
import os
import base64
import requests
import datetime
import traceback
from github import Github, GithubException
github-trends:
import os
import requests
import pandas as pd
import matplotlib.pyplot as plt
from github import Github
from dotenv import load_dotenv
Key Differences
- waka-readme focuses specifically on WakaTime integration for coding time statistics
- github-trends provides a broader range of GitHub activity analysis and visualization
- waka-readme has a simpler setup process and fewer dependencies
- github-trends offers more customization options and detailed insights
Use Cases
- Choose waka-readme for quick and easy integration of coding time statistics in your GitHub profile
- Opt for github-trends when you need comprehensive GitHub activity analysis and customizable visualizations
Community and Support
- Both projects have active communities and regular updates
- waka-readme has a larger user base and more contributors
- github-trends offers more extensive documentation and examples
😎 A curated list of awesome GitHub Profile which updates in real time
Pros of awesome-github-profile-readme
- Comprehensive collection of creative and inspiring GitHub profile READMEs
- Includes tools, articles, and resources for creating profile READMEs
- Community-driven with a wide variety of examples and styles
Cons of awesome-github-profile-readme
- Requires manual browsing and implementation of ideas
- No automated integration with GitHub profiles
- May be overwhelming due to the large number of examples
Code comparison
waka-readme:
import re
import os
import base64
import requests
from github import Github, InputGitAuthor
def update_readme():
# Code to update README with WakaTime stats
awesome-github-profile-readme:
# Awesome GitHub Profile README
A curated list of awesome GitHub Profile READMEs
## Categories
- [Tools](#tools)
- [Articles](#articles)
- [Tutorials](#tutorials)
Summary
waka-readme is a focused tool for automatically updating GitHub profile READMEs with WakaTime statistics, while awesome-github-profile-readme is a comprehensive resource for inspiration and guidance on creating unique profile READMEs. waka-readme offers automation but is limited to WakaTime integration, whereas awesome-github-profile-readme provides a wide range of ideas and resources but requires manual implementation.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Dev Metrics in Readme
WakaTime coding metrics on your profile readme.
:speech_balloon: Forum | GitHub discussions
New to WakaTime?
Nope? Skip to #Prep work.
WakaTime gives you an idea of the time you spent on coding. This helps you boost your productivity and competitive edge (aka flex :muscle:).
- Head over to https://wakatime.com/ and create an account.
- After logging in get your WakaTime API Key from https://wakatime.com/api-key/.
- Install WakaTime plugin in your favorite editor / IDE.
- Paste in your API key to start telemetry.
:information_source: Info | You can read WakaTime help to know more about configurations. Alternatively, you can fetch data from WakaTime compatible services such as Wakapi or Hakatime.
Prep Work
A GitHub repository and a README.md
file is required. We'll be making use of readme in the profile repository.
-
Save the
README.md
file after copy-pasting the following special comments. Your dev-metics will show up in between.<!--START_SECTION:waka--> <!--END_SECTION:waka-->
<!--START_SECTION: -->
and<!--END_SECTION: -->
are placeholders and must be retained as is. Whereas "waka
" can be replaced by any alphanumeric string. See #Tweaks section for more. -
Navigate to your repo's
Settings
:-
Go to
Secrets
(athttps://github.com/USERNAME/USERNAME/settings/secrets/actions/new
by replacing theUSERNAME
with your own username) and add a new secret "Named"WAKATIME_API_KEY
with your API key as it's "Secret".If you're not using profile repository, add another secret "Named"
GH_TOKEN
and in place of "Secret" insert your GitHub token. -
Go to
Workflow permissions
underActions
(athttps://github.com/USERNAME/USERNAME/settings/actions
by replacing theUSERNAME
with your own username) and setRead and write permissions
.
-
-
Create a new workflow file named
waka-readme.yml
inside.github/workflows/
folder of your repository. -
Clear all existing contents, add following lines and save the file.
name: Waka Readme on: # for manual workflow trigger workflow_dispatch: schedule: # runs at 12 AM UTC (5:30 AM IST) - cron: "0 0 * * *" jobs: update-readme: name: WakaReadme DevMetrics runs-on: ubuntu-latest steps: - uses: athul/waka-readme@master # this action name with: WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
Refer #Example section for a full blown workflow file.
Tweaks
There are many flags that you can modify as you see fit.
Meta Tweaks
Environment flag | Options (Default , Other , ...) | Description |
---|---|---|
API_BASE_URL | https://wakatime.com/api , https://wakapi.dev/api , https://hakatime.mtx-dev.xyz/api | Use WakaTime compatible services like Wakapi & Hakatime |
REPOSITORY | <gh_username>/<gh_username> , <gh_username>/<repo_name> | Waka-readme stats will appear on the provided repository |
Content Tweaks
Environment flag | Options (Default , Other , ...) | Description |
---|---|---|
SHOW_TITLE | false , true | Add title to waka-readme stats blob |
SECTION_NAME | waka , any alphanumeric string | The generator will look for section name to fill up the readme. |
BLOCKS | ââââ , â£â£â£¤â£¦â£¶â£·â£¿ , -# , => , you can be creative | Ascii art used to build stats graph |
CODE_LANG | txt , python ruby json , you can use other languages also | Language syntax based highlighted text |
TIME_RANGE | last_7_days , last_30_days , last_6_months , last_year , all_time | String representing a dispensation from which stats are aggregated |
LANG_COUNT | 5 , any plausible number | Number of languages to be displayed |
SHOW_TIME | true , false | Displays the amount of time spent for each language |
SHOW_TOTAL | false , true | Show total coding time |
SHOW_MASKED_TIME | false , true | Adds total coding time including unclassified languages (overrides: SHOW_TOTAL ) |
STOP_AT_OTHER | false , true | Stop when language marked as Other is retrieved (overrides: LANG_COUNT ) |
IGNORED_LANGUAGES | , Binary YAML JSON TOML | Hide languages from your stats |
Commit Tweaks
Environment flag | Options (Default , Other , ...) |
---|---|
COMMIT_MESSAGE | Updated waka-readme graph with new metrics , any reasonable message |
TARGET_BRANCH | NOT_SET , target branch name |
TARGET_PATH | NOT_SET , /path/to/target/file |
COMMITTER_NAME | NOT_SET , committer name |
COMMITTER_EMAIL | NOT_SET , committer email |
AUTHOR_NAME | NOT_SET , author name |
AUTHOR_EMAIL | NOT_SET , author email |
The first option is the default value of the flag, subsequent options are valid values available for the flag.
Example
waka-readme.yml
name: Waka Readme
on:
# for manual workflow trigger
workflow_dispatch:
schedule:
# runs at 12 AM UTC (5:30 AM IST)
- cron: "0 0 * * *"
jobs:
update-readme:
name: WakaReadme DevMetrics
runs-on: ubuntu-latest
steps:
# this action name
- uses: athul/waka-readme@master # do NOT replace with anything else
with:
GH_TOKEN: ${{ secrets.GH_TOKEN }} # optional if on profile readme
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }} # required
### meta
API_BASE_URL: https://wakatime.com/api # optional
REPOSITORY: YOUR_GITHUB_USERNAME/YOUR_REPOSITORY_NAME # optional
### content
SHOW_TITLE: true # optional
SECTION_NAME: waka # optional
BLOCKS: -> # optional
CODE_LANG: rust # optional
TIME_RANGE: all_time # optional
LANG_COUNT: 10 # optional
SHOW_TIME: true # optional
SHOW_TOTAL: true # optional
SHOW_MASKED_TIME: false # optional
STOP_AT_OTHER: true # optional
IGNORED_LANGUAGES: YAML JSON TOML # optional
### commit
COMMIT_MESSAGE: Updated waka-readme graph with new metrics # optional
TARGET_BRANCH: master # optional
TARGET_PATH: README.md # optional
COMMITTER_NAME: GitHubActionBot # optional
COMMITTER_EMAIL: action-bot@github.com # optional
AUTHOR_NAME: YOUR_NAME # optional
AUTHOR_EMAIL: YOUR@EMAIL.com # optional
# you can populate email-id with secrets instead
Rendered markdown
:
From: 10 July 2020 - To: 06 August 2022
Total Time: 1,464 hrs 54 mins
Python 859 hrs 29 mins >>>>>>>>>>>>>>----------- 54.68 %
Markdown 132 hrs 33 mins >>----------------------- 08.43 %
TeX 103 hrs 52 mins >>----------------------- 06.61 %
HTML 94 hrs 48 mins >>----------------------- 06.03 %
Nim 64 hrs 31 mins >------------------------ 04.11 %
Other 47 hrs 58 mins >------------------------ 03.05 %
Notes
- Flags
REPOSITORY
andGH_TOKEN
are required ONLY if, you are NOT using profile readme. - If you are using
GH_TOKEN
, make sure set the fine grained token scope to repository contents withread-and-write
access. See #141 (comment). WAKATIME_API_KEY
is a required secret. All other environment variables are optional.- The above example does NOT show proper default values, refer #Tweaks for the same.
IGNORED_LANGUAGES
is suggested for .NET users, as WakaTime assumes you're working withBinary
, while debugging.
Why only the language stats (and not other data) from the API?
I am a fan of minimal designs and the profile readme is a great way to show off your skills and interests. The WakaTime API, gets us a lot of data about a person's coding activity including the editors and Operating Systems you used and the projects you worked on. Some of these projects maybe secretive and should not be shown out to the public. Using up more data via the Wakatime API will clutter the profile readme and hinder your chances on displaying what you provide value to the community like the pinned Repositories. I believe that Coding Stats is nerdiest of all since you can tell the community that you are exercising these languages or learning a new language, this will also show that you spend some amount of time to learn and exercise your development skills. That's what matters in the end :heart:
Top Related Projects
This GitHub action helps to add cool dev metrics to your github profile Readme
📊 A minimalist, self-hosted WakaTime-compatible backend for coding statistics
📊 Update a pinned gist to contain your weekly WakaTime stats
🚀 Level up your GitHub profile readme with customizable cards including LOC statistics!
😎 A curated list of awesome GitHub Profile which updates in real time
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot