From 64bb35f86d325a0b21ce9b1fe5f39af4a6c0e122 Mon Sep 17 00:00:00 2001
From: Anmol
Date: Tue, 21 Jul 2020 01:18:00 +0530
Subject: [PATCH 01/11] FEAT: ADDED COMMIT DEV METRICS
---
action.yml | 5 +++
main.py | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 119 insertions(+), 2 deletions(-)
diff --git a/action.yml b/action.yml
index 1b18060..ad9f050 100644
--- a/action.yml
+++ b/action.yml
@@ -37,6 +37,11 @@ inputs:
description: 'Show the time zone in the dev metrics'
default: "True"
+ SHOW_COMMIT:
+ required: false
+ description: "Shows the number of commit graph in the dev metrics"
+ default: "True"
+
diff --git a/main.py b/main.py
index 41acb41..4901d07 100644
--- a/main.py
+++ b/main.py
@@ -5,10 +5,11 @@ WakaTime progress visualizer
import re
import os
import base64
-import datetime
import pytz
import requests
from github import Github
+import datetime
+from string import Template
START_COMMENT = ''
END_COMMENT = ''
@@ -21,8 +22,59 @@ showTimeZone = os.getenv('INPUT_SHOW_TIMEZONE')
showProjects = os.getenv('INPUT_SHOW_PROJECTS')
showEditors = os.getenv('INPUT_SHOW_EDITORS')
showOs = os.getenv('INPUT_SHOW_OS')
+showCommit = os.getenv('INPUT_SHOW_COMMIT')
-print(showTimeZone + " " + showOs + " " + showProjects + " " + showEditors)
+headers = {"Authorization": "Bearer " + ghtoken}
+# The GraphQL query to get commit data.
+userInfoQuery = """
+{
+ viewer {
+ login
+ id
+ }
+ }
+"""
+createContributedRepoQuery = Template("""query {
+ user(login: "$username") {
+ repositoriesContributedTo(last: 100, includeUserRepositories: true) {
+ nodes {
+ isFork
+ name
+ owner {
+ login
+ }
+ }
+ }
+ }
+ }
+""")
+createCommittedDateQuery = Template("""
+query {
+ repository(owner: "$owner", name: "$name") {
+ ref(qualifiedName: "master") {
+ target {
+ ... on Commit {
+ history(first: 100, author: { id: "$id" }) {
+ edges {
+ node {
+ committedDate
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+""")
+
+
+def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section.
+ request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers)
+ if request.status_code == 200:
+ return request.json()
+ else:
+ raise Exception("Query failed to run by returning code of {}. {}".format(request.status_code, query))
def this_week():
@@ -53,6 +105,63 @@ def make_list(data: list):
return ' \n'.join(data_list)
+def make_commit_list(data: list):
+ '''Make List'''
+ data_list = []
+ for l in data[:5]:
+ ln = len(l['name'])
+ ln_text = len(l['text'])
+ op = f"{l['name']}{' ' * (13 - ln)}{l['text']}{' ' * (15 - ln_text)}{make_graph(l['percent'])} {l['percent']}%"
+ data_list.append(op)
+ return ' \n'.join(data_list)
+
+
+def generate_commit_list():
+ result = run_query(userInfoQuery) # Execute the query
+ username = result["data"]["viewer"]["login"]
+ id = result["data"]["viewer"]["id"]
+ print("user {} id {}".format(username, id))
+
+ result = run_query(createContributedRepoQuery.substitute(username=username))
+ nodes = result["data"]["user"]["repositoriesContributedTo"]["nodes"]
+ repos = [d for d in nodes if d['isFork'] is False]
+
+ morning = 0 # 6 - 12
+ daytime = 0 # 12 - 18
+ evening = 0 # 18 - 24
+ night = 0 # 0 - 6
+
+ for repository in repos:
+ result = run_query(
+ createCommittedDateQuery.substitute(owner=repository["owner"]["login"], name=repository["name"], id=id))
+ committed_dates = result["data"]["repository"]["ref"]["target"]["history"]["edges"]
+ for committedDate in committed_dates:
+ date = datetime.datetime.strptime(committedDate["node"]["committedDate"], "%Y-%m-%dT%H:%M:%SZ")
+ hour = date.hour
+ if 6 <= hour < 12:
+ morning += 1
+ if 12 <= hour < 18:
+ daytime += 1
+ if 18 <= hour < 24:
+ evening += 1
+ if 0 <= hour < 6:
+ night += 1
+
+ sumAll = morning + daytime + evening + night
+ if morning + daytime >= evening + night:
+ title = "I'm an early π€"
+ else:
+ title = "I'm a night π¦"
+ one_day = [
+ {"name": "π Morning", "text": str(morning) + " commits", "percent": round((morning / sumAll) * 100, 2)},
+ {"name": "π Daytime", "text": str(daytime) + " commits", "percent": round((daytime / sumAll) * 100, 2)},
+ {"name": "π Evening", "text": str(evening) + " commits", "percent": round((evening / sumAll) * 100, 2)},
+ {"name": "π Night", "text": str(night) + " commits", "percent": round((night / sumAll) * 100, 2)},
+ ]
+
+ return make_commit_list(one_day)
+
+
def get_stats():
'''Gets API data and returns markdown progress'''
data = requests.get(
@@ -78,6 +187,9 @@ def get_stats():
os_list = make_list(data['data']['operating_systems'])
stats = stats + 'π» Operating Systems: \n' + os_list + '\n\n'
+ if showCommit.lower() in ['true', '1', 't', 'y', 'yes']:
+ stats = stats + generate_commit_list()
+
return '```text\n' + stats + '```'
From b8cf37d7405b093764e206ec5cb5678ae132417a Mon Sep 17 00:00:00 2001
From: Anmol
Date: Tue, 21 Jul 2020 01:33:25 +0530
Subject: [PATCH 02/11] FEAT: ADDED COMMIT DEV METRICS
---
action.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/action.yml b/action.yml
index ad9f050..ad87882 100644
--- a/action.yml
+++ b/action.yml
@@ -6,7 +6,7 @@ inputs:
GH_TOKEN:
description: 'GitHub access token with Repo scope'
required: true
- default: ${{ github.token }}
+ default: ${{ GITHUB_TOKEN }}
WAKATIME_API_KEY:
description: 'Your Wakatime API Key'
From c210090edc8cfec53d7bee438186410b8eb5e120 Mon Sep 17 00:00:00 2001
From: Anmol
Date: Tue, 21 Jul 2020 01:36:50 +0530
Subject: [PATCH 03/11] FEAT: ADDED COMMIT DEV METRICS
---
action.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/action.yml b/action.yml
index ad87882..ad9f050 100644
--- a/action.yml
+++ b/action.yml
@@ -6,7 +6,7 @@ inputs:
GH_TOKEN:
description: 'GitHub access token with Repo scope'
required: true
- default: ${{ GITHUB_TOKEN }}
+ default: ${{ github.token }}
WAKATIME_API_KEY:
description: 'Your Wakatime API Key'
From 49e0a83abdfd0e2a530a7602e0519c1ebf520d91 Mon Sep 17 00:00:00 2001
From: Anmol
Date: Tue, 21 Jul 2020 01:48:17 +0530
Subject: [PATCH 04/11] FIX: UI CHANGES FOR THE METRICS
---
main.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/main.py b/main.py
index 4901d07..30c7c4a 100644
--- a/main.py
+++ b/main.py
@@ -159,7 +159,7 @@ def generate_commit_list():
{"name": "π Night", "text": str(night) + " commits", "percent": round((night / sumAll) * 100, 2)},
]
- return make_commit_list(one_day)
+ return '**' + title + '** \n\n' + '```text\n' + make_commit_list(one_day) + '```'
def get_stats():
@@ -167,7 +167,7 @@ def get_stats():
data = requests.get(
f"https://wakatime.com/api/v1/users/current/stats/last_7_days?api_key={waka_key}").json()
- stats = ''
+ stats = '```text\n'
if showTimeZone.lower() in ['true', '1', 't', 'y', 'yes']:
timezone = data['data']['timezone']
stats = stats + 'βοΈ Timezone: ' + timezone + '\n\n'
@@ -187,10 +187,12 @@ def get_stats():
os_list = make_list(data['data']['operating_systems'])
stats = stats + 'π» Operating Systems: \n' + os_list + '\n\n'
- if showCommit.lower() in ['true', '1', 't', 'y', 'yes']:
- stats = stats + generate_commit_list()
+ stats = stats + '```'
- return '```text\n' + stats + '```'
+ if showCommit.lower() in ['true', '1', 't', 'y', 'yes']:
+ stats = stats + generate_commit_list() + '\n\n'
+
+ return stats
def decode_readme(data: str):
From 104184665d4a5f2adad238d97be3683a2be3ab01 Mon Sep 17 00:00:00 2001
From: Anmol
Date: Tue, 21 Jul 2020 01:55:56 +0530
Subject: [PATCH 05/11] FIX: UI CHANGES FOR THE METRICS
---
main.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/main.py b/main.py
index 30c7c4a..091dcaa 100644
--- a/main.py
+++ b/main.py
@@ -121,6 +121,7 @@ def generate_commit_list():
username = result["data"]["viewer"]["login"]
id = result["data"]["viewer"]["id"]
print("user {} id {}".format(username, id))
+ print("on new version");
result = run_query(createContributedRepoQuery.substitute(username=username))
nodes = result["data"]["user"]["repositoriesContributedTo"]["nodes"]
@@ -187,7 +188,7 @@ def get_stats():
os_list = make_list(data['data']['operating_systems'])
stats = stats + 'π» Operating Systems: \n' + os_list + '\n\n'
- stats = stats + '```'
+ stats = stats + '```\n\n'
if showCommit.lower() in ['true', '1', 't', 'y', 'yes']:
stats = stats + generate_commit_list() + '\n\n'
From f7b5be62754881fc7b80d05a9fd0c9f4301270d7 Mon Sep 17 00:00:00 2001
From: Anmol
Date: Tue, 21 Jul 2020 01:58:53 +0530
Subject: [PATCH 06/11] FIX: UI CHANGES FOR THE METRICS
---
main.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/main.py b/main.py
index 091dcaa..3752b7b 100644
--- a/main.py
+++ b/main.py
@@ -121,7 +121,7 @@ def generate_commit_list():
username = result["data"]["viewer"]["login"]
id = result["data"]["viewer"]["id"]
print("user {} id {}".format(username, id))
- print("on new version");
+ print("on new version")
result = run_query(createContributedRepoQuery.substitute(username=username))
nodes = result["data"]["user"]["repositoriesContributedTo"]["nodes"]
@@ -160,7 +160,7 @@ def generate_commit_list():
{"name": "π Night", "text": str(night) + " commits", "percent": round((night / sumAll) * 100, 2)},
]
- return '**' + title + '** \n\n' + '```text\n' + make_commit_list(one_day) + '```'
+ return '**' + title + '** \n\n' + '```text\n' + make_commit_list(one_day) + '\n\n```\n'
def get_stats():
From aad574a5b3da9dcf93efa35b6df820a7036c6fb7 Mon Sep 17 00:00:00 2001
From: Anmol
Date: Tue, 21 Jul 2020 12:56:51 +0530
Subject: [PATCH 07/11] FIX: Added Error Handling
---
main.py | 89 ++++++++++++++++++++++++++++++---------------------------
1 file changed, 47 insertions(+), 42 deletions(-)
diff --git a/main.py b/main.py
index 3752b7b..70edb1a 100644
--- a/main.py
+++ b/main.py
@@ -1,11 +1,10 @@
'''
-WakaTime progress visualizer
+Readme Development Metrics With waka time progress
'''
import re
import os
import base64
-import pytz
import requests
from github import Github
import datetime
@@ -23,8 +22,8 @@ showProjects = os.getenv('INPUT_SHOW_PROJECTS')
showEditors = os.getenv('INPUT_SHOW_EDITORS')
showOs = os.getenv('INPUT_SHOW_OS')
showCommit = os.getenv('INPUT_SHOW_COMMIT')
+showLanguage = os.getenv('INPUT_SHOW_LANGUAGE')
-headers = {"Authorization": "Bearer " + ghtoken}
# The GraphQL query to get commit data.
userInfoQuery = """
{
@@ -69,7 +68,7 @@ query {
""")
-def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section.
+def run_query(query):
request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers)
if request.status_code == 200:
return request.json()
@@ -77,15 +76,6 @@ def run_query(query): # A simple function to use requests.post to make the API
raise Exception("Query failed to run by returning code of {}. {}".format(request.status_code, query))
-def this_week():
- '''Returns current week span'''
- week_number = datetime.date.today().isocalendar()[1]
- month = datetime.date.today().strftime('%B')
- week_start = datetime.datetime.today().day - datetime.datetime.today().weekday()
- week_end = week_start + 5
- return f"Week #{week_number} : {month} {week_start} - {week_end}"
-
-
def make_graph(percent: float):
'''Make progress graph from API graph'''
done_block = 'β'
@@ -121,7 +111,6 @@ def generate_commit_list():
username = result["data"]["viewer"]["login"]
id = result["data"]["viewer"]["id"]
print("user {} id {}".format(username, id))
- print("on new version")
result = run_query(createContributedRepoQuery.substitute(username=username))
nodes = result["data"]["user"]["repositoriesContributedTo"]["nodes"]
@@ -165,33 +154,45 @@ def generate_commit_list():
def get_stats():
'''Gets API data and returns markdown progress'''
- data = requests.get(
- f"https://wakatime.com/api/v1/users/current/stats/last_7_days?api_key={waka_key}").json()
+ stats = ''
+ try:
+ request = requests.get(
+ f"https://wakatime.com/api/v1/users/current/stats/last_7_days?api_key={waka_key}")
- stats = '```text\n'
- if showTimeZone.lower() in ['true', '1', 't', 'y', 'yes']:
- timezone = data['data']['timezone']
- stats = stats + 'βοΈ Timezone: ' + timezone + '\n\n'
+ if request.status_code == 200:
+ data = request.json()
+ stats = stats + '```text\n'
+ if showTimeZone.lower() in ['true', '1', 't', 'y', 'yes']:
+ timezone = data['data']['timezone']
+ stats = stats + 'βοΈ Timezone: ' + timezone + '\n\n'
- lang_list = make_list(data['data']['languages'])
- stats = stats + 'π¬ Languages: \n' + lang_list + '\n\n'
+ if showLanguage.lower() in ['true', '1', 't', 'y', 'yes']:
+ lang_list = make_list(data['data']['languages'])
+ stats = stats + 'π¬ Languages: \n' + lang_list + '\n\n'
- if showEditors.lower() in ['true', '1', 't', 'y', 'yes']:
- edit_list = make_list(data['data']['editors'])
- stats = stats + 'π₯ Editors: \n' + edit_list + '\n\n'
+ if showEditors.lower() in ['true', '1', 't', 'y', 'yes']:
+ edit_list = make_list(data['data']['editors'])
+ stats = stats + 'π₯ Editors: \n' + edit_list + '\n\n'
- if showProjects.lower() in ['true', '1', 't', 'y', 'yes']:
- project_list = make_list(data['data']['projects'])
- stats = stats + 'π±βπ» Projects: \n' + project_list + '\n\n'
+ if showProjects.lower() in ['true', '1', 't', 'y', 'yes']:
+ project_list = make_list(data['data']['projects'])
+ stats = stats + 'π±βπ» Projects: \n' + project_list + '\n\n'
- if showOs.lower() in ['true', '1', 't', 'y', 'yes']:
- os_list = make_list(data['data']['operating_systems'])
- stats = stats + 'π» Operating Systems: \n' + os_list + '\n\n'
+ if showOs.lower() in ['true', '1', 't', 'y', 'yes']:
+ os_list = make_list(data['data']['operating_systems'])
+ stats = stats + 'π» Operating Systems: \n' + os_list + '\n\n'
- stats = stats + '```\n\n'
+ stats = stats + '```\n\n'
+ else:
+ print("Waka Time Api Key Not Configured Properly")
+ except Exception as e:
+ print("Waka Time Api Key Not Configured" + str(e))
if showCommit.lower() in ['true', '1', 't', 'y', 'yes']:
- stats = stats + generate_commit_list() + '\n\n'
+ try:
+ stats = stats + generate_commit_list() + '\n\n'
+ except Exception as ex:
+ print("GitHub Personal access token not configured properly or invalid" + str(ex))
return stats
@@ -209,12 +210,16 @@ def generate_new_readme(stats: str, readme: str):
if __name__ == '__main__':
- g = Github(ghtoken)
- repo = g.get_repo(f"{user}/{user}")
- contents = repo.get_readme()
- waka_stats = get_stats()
- rdmd = decode_readme(contents.content)
- new_readme = generate_new_readme(stats=waka_stats, readme=rdmd)
- if new_readme != rdmd:
- repo.update_file(path=contents.path, message='Updated with Dev Metrics',
- content=new_readme, sha=contents.sha, branch='master')
+ try:
+ g = Github(ghtoken)
+ repo = g.get_repo(f"{user}/{user}")
+ contents = repo.get_readme()
+ headers = {"Authorization": "Bearer " + ghtoken}
+ waka_stats = get_stats()
+ rdmd = decode_readme(contents.content)
+ new_readme = generate_new_readme(stats=waka_stats, readme=rdmd)
+ if new_readme != rdmd:
+ repo.update_file(path=contents.path, message='Updated with Dev Metrics',
+ content=new_readme, sha=contents.sha, branch='master')
+ except Exception as e:
+ print("Exception Occurred" + str(e))
From 95a5e7e9db8710a7b662af008265eb4c1a00a010 Mon Sep 17 00:00:00 2001
From: Anmol
Date: Tue, 21 Jul 2020 12:58:24 +0530
Subject: [PATCH 08/11] FIX: Added Error Handling
---
action.yml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/action.yml b/action.yml
index ad9f050..713ed84 100644
--- a/action.yml
+++ b/action.yml
@@ -42,6 +42,11 @@ inputs:
description: "Shows the number of commit graph in the dev metrics"
default: "True"
+ SHOW_LANGUAGE:
+ required: false
+ description: "Show the Coding language used in dev metrics"
+ default: "True"
+
From 1669e1805dc7424592c0c8c1ece9fc14c0d81142 Mon Sep 17 00:00:00 2001
From: Anmol
Date: Tue, 21 Jul 2020 13:04:21 +0530
Subject: [PATCH 09/11] FIX: Added Error Handling
---
main.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/main.py b/main.py
index 70edb1a..c083be1 100644
--- a/main.py
+++ b/main.py
@@ -161,6 +161,7 @@ def get_stats():
if request.status_code == 200:
data = request.json()
+ stats = stats + 'π **This week I spent my time on** \n\n'
stats = stats + '```text\n'
if showTimeZone.lower() in ['true', '1', 't', 'y', 'yes']:
timezone = data['data']['timezone']
From 265addd251742e332b59a1c1f03592bb9620ef4e Mon Sep 17 00:00:00 2001
From: Anmol
Date: Tue, 21 Jul 2020 13:11:20 +0530
Subject: [PATCH 10/11] FIX: Added Error Handling
---
main.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/main.py b/main.py
index c083be1..b056db2 100644
--- a/main.py
+++ b/main.py
@@ -155,6 +155,13 @@ def generate_commit_list():
def get_stats():
'''Gets API data and returns markdown progress'''
stats = ''
+
+ if showCommit.lower() in ['true', '1', 't', 'y', 'yes']:
+ try:
+ stats = stats + generate_commit_list() + '\n\n'
+ except Exception as ex:
+ print("GitHub Personal access token not configured properly or invalid" + str(ex))
+
try:
request = requests.get(
f"https://wakatime.com/api/v1/users/current/stats/last_7_days?api_key={waka_key}")
@@ -189,12 +196,6 @@ def get_stats():
except Exception as e:
print("Waka Time Api Key Not Configured" + str(e))
- if showCommit.lower() in ['true', '1', 't', 'y', 'yes']:
- try:
- stats = stats + generate_commit_list() + '\n\n'
- except Exception as ex:
- print("GitHub Personal access token not configured properly or invalid" + str(ex))
-
return stats
From 36336b655724fefb0658af2cc985593e309311bf Mon Sep 17 00:00:00 2001
From: Anmol
Date: Tue, 21 Jul 2020 14:02:17 +0530
Subject: [PATCH 11/11] FIX: Updated README.md
---
README.md | 116 +++++++++++++++++++++++++-----------------------------
1 file changed, 53 insertions(+), 63 deletions(-)
diff --git a/README.md b/README.md
index d8bdcfa..8d7a35a 100644
--- a/README.md
+++ b/README.md
@@ -1,23 +1,46 @@
-# Dev Metrics in Readme
+# Dev Metrics in Readme with added feature flags π
+
+
+
+
+
+ 
+
+
πβ¨Awesome Readme Stats
+
-
----
-[WakaTime](https://wakatime.com) Weekly Metrics on your Profile Readme:
+
+
+
+
+
+
+
+ Are you an early π€ or a night π¦?
+
+ When are you most productive during the day?
+
+ The languages you code in
+
+ Let's check out in your readme!
+
## Prep Work
1. You need to update the markdown file(.md) with 2 comments. You can refer [here](#update-your-readme) for updating it.
2. You'll need a WakaTime API Key. You can get that from your WakaTime Account Settings
- You can refer [here](#new-to-wakatime), if you're new to WakaTime
-3. **Optional** You'll need a GitHub API Token with `repo` scope from [here](https://github.com/settings/tokens) if you're running the action not in your Profile Repository
- - You can use [this](#other-repository-not-profile) example to work it out
-4. You need to save the WakaTime API Key (and the GitHub API Token, if you need it) in the repository secrets. You can find that in the Settings of your Repository.Be sure to save those as the following.
+3. You'll need a GitHub API Token with `repo` scope from [here](https://github.com/settings/tokens) if you're running the action to get commit metrics
+ > enable `repo` scope seems **DANGEROUS**
+ > but this GitHub Action only accesses your commit timestamp in repository you contributed.
+ - You can use [this](#profile-repository) example to work it out
+4. You need to save the WakaTime API Key and the GitHub API Token in the repository secrets. You can find that in the Settings of your Repository.Be sure to save those as the following.
- WakaTime-api-key as `WAKATIME_API_KEY = `and
- The GitHub Access Token as `GH_TOKEN=`
-5. You can follow either of the Two Examples according to your needs to get started with.
+5. You can enable and disable feature flags based on requirements.
-> I strongly suggest you to run the Action in your Profile Repo since you won't be needing a GitHub Access Token
This Action will run everyday at 00.00 IST
@@ -43,32 +66,6 @@ WakaTime gives you an idea of the time you really spent on coding. This helps yo
### Profile Repository
-*If you're executing the workflow on your Profile Repository (`/`)*
-
-> You wouldn't need an GitHub Access Token since GitHub Actions already makes one for you.
-
-Here is a sample workflow file for you to get started:
-
-```yml
-name: Waka Readme
-
-on:
- schedule:
- # Runs at 12am IST
- - cron: '30 18 * * *'
-
-jobs:
- update-readme:
- name: Update this repo's README
- runs-on: ubuntu-latest
- steps:
- - uses: anmol098/waka-readme@master
- with:
- WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
-```
-
-### Other Repository (not Profile)
-
*If you're executing the workflow on another repo other than `/`*
You'll need to get a [GitHub Access Token](https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) with a `repo` scope and save it in the Repo Secrets `GH_TOKEN = `
@@ -88,7 +85,7 @@ jobs:
name: Update Readme with Metrics
runs-on: ubuntu-latest
steps:
- - uses: anmol098/waka-readme@master
+ - uses: anmol098/waka-readme-stats@master
with:
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
@@ -99,7 +96,7 @@ jobs:
1. If you want to add the other info to your stats, you can add multiple `FLAGS` in your workflow file by default all flags are enabled
```yml
-- uses: anmol098/waka-readme@master
+- uses: anmol098/waka-readme-stats@master
with:
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
@@ -109,7 +106,18 @@ jobs:
```
#### Flags Available
-`SHOW_OS` flag can be set to `False` to hide the OS details
+`SHOW_COMMIT` flag can be set to `False` to hide the commit stats
+
+**I'm an early π€**
+```text
+π Morning 95 commits βββββββββββββββββββββββββ 30.55%
+π Daytime 78 commits βββββββββββββββββββββββββ 25.08%
+π Evening 112 commits βββββββββββββββββββββββββ 36.01%
+π Night 26 commits βββββββββββββββββββββββββ 8.36%
+
+```
+
+`SHOW_LANGUAGE` flag can be set to `False` to hide the Coding Language You use
```text
π¬ Languages:
@@ -118,7 +126,12 @@ PHP 1 hr 35 mins βββββββββββ
Markdown 1 hr 9 mins βββββββββββββββββββββββββ 13.3%
Python 22 mins βββββββββββββββββββββββββ 4.32%
XML 8 mins βββββββββββββββββββββββββ 1.62%
+```
+
+`SHOW_OS` flag can be set to `False` to hide the OS details
+
+```text
π» Operating Systems:
Windows 8 hrs 46 mins βββββββββββββββββββββββββ 100.0%
```
@@ -126,53 +139,30 @@ Windows 8 hrs 46 mins βββββββββββ
`SHOW_PROJECTS` flag can be set to `False` to hide the Projects worked on
```text
-π¬ Languages:
-JavaScript 5 hrs 26 mins βββββββββββββββββββββββββ 61.97%
-PHP 1 hr 35 mins βββββββββββββββββββββββββ 18.07%
-Markdown 1 hr 9 mins βββββββββββββββββββββββββ 13.3%
-Python 22 mins βββββββββββββββββββββββββ 4.32%
-XML 8 mins βββββββββββββββββββββββββ 1.62%
-
π±βπ» Projects:
ctx_connector 4 hrs 3 mins βββββββββββββββββββββββββ 46.33%
NetSuite-Connector 1 hr 31 mins βββββββββββββββββββββββββ 17.29%
mango-web-master 1 hr 12 mins βββββββββββββββββββββββββ 13.77%
cable 54 mins βββββββββββββββββββββββββ 10.41%
denAPI 40 mins βββββββββββββββββββββββββ 7.66%
-
```
`SHOW_TIMEZONE` flag can be set to `False` to hide the time zone you are in
```text
βοΈ Timezone: Asia/Calcutta
-
-π¬ Languages:
-JavaScript 5 hrs 26 mins βββββββββββββββββββββββββ 61.97%
-PHP 1 hr 35 mins βββββββββββββββββββββββββ 18.07%
-Markdown 1 hr 9 mins βββββββββββββββββββββββββ 13.3%
-Python 22 mins βββββββββββββββββββββββββ 4.32%
-XML 8 mins βββββββββββββββββββββββββ 1.62%
-
```
-`SHOW_EDITORS` flag can be set to `False` to hide the code-editor list you use
+`SHOW_EDITORS` flag can be set to `False` to hide the list of code-editors used
```text
-π¬ Languages:
-JavaScript 5 hrs 26 mins βββββββββββββββββββββββββ 61.97%
-PHP 1 hr 35 mins βββββββββββββββββββββββββ 18.07%
-Markdown 1 hr 9 mins βββββββββββββββββββββββββ 13.3%
-Python 22 mins βββββββββββββββββββββββββ 4.32%
-XML 8 mins βββββββββββββββββββββββββ 1.62%
-
π₯ Editors:
WebStorm 6 hrs 47 mins βββββββββββββββββββββββββ 77.43%
PhpStorm 1 hr 35 mins βββββββββββββββββββββββββ 18.07%
PyCharm 23 mins βββββββββββββββββββββββββ 4.49%
-
```
-This project is inspired from [athul/waka-readme](https://github.com/athul/waka-readme) with added extra feature.
+> This project is inspired by an awesome pinned-gist project [Awesome Pinned Gists](https://github.com/matchai/awesome-pinned-gists)
+>This project is inspired from [athul/waka-readme](https://github.com/athul/waka-readme)
### Don't forget to leave a β if you found this useful.