You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- flags are now available to modify commit information
- adds these flags to `dockerfile` & `action.yml`
- fixes a few typos
- improves `Readme.md`
- updates secondary dependencies
- bumps project version
**Related Items**
_Issues_
- Closes#103
- Closes#104
- Closes#125
Copy file name to clipboardExpand all lines: README.md
+69-26Lines changed: 69 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ Alternatively, you can also fetch data from WakaTime compatible services like [W
28
28
29
29
## Prep Work
30
30
31
-
A GitHub repository and a `README.md` file is required. We'll be making use of readme in the [profile repository][profile_readme]\*.
31
+
A GitHub repository and a `README.md` file is required. We'll be making use of readme in the [profile repository][profile_readme].
32
32
33
33
- Save the `README.md` file after copy-pasting the following special comments. Your dev-metics will show up in between.
34
34
@@ -48,7 +48,7 @@ A GitHub repository and a `README.md` file is required. We'll be making use of r
48
48
- If you're not using [profile repository][profile_readme], add another secret _named_`GH_TOKEN` and insert your [GitHub token][gh_access_token]\* in place of _value_.
49
49
50
50
- Create a new workflow file (`waka-readme.yml`) inside `.github/workflows/` folder of your repository. You can create it from a template using the _actions tab_ of your repository too.
51
-
- Clear any existing contents, add the following lines and save the file.
51
+
- Clear any existing contents, add the following lines and save the `waka-readme.yml` workflow file.
52
52
53
53
```yml
54
54
name: Waka Readme
@@ -72,25 +72,47 @@ A GitHub repository and a `README.md` file is required. We'll be making use of r
72
72
#REPOSITORY: <gh_username/gh_username>
73
73
```
74
74
75
+
Refer [#Example](#example) section for a full blown workflow file.
76
+
75
77
## Tweaks
76
78
77
-
There are many flags that you can tweak to suit your taste!
|`API_BASE_URL`|`https://wakatime.com/api`|`https://wakatime.com/api`, `https://wakapi.dev/api`, `https://hakatime.mtx-dev.xyz/api`| Integration with WakaTime compatible services like [Wakapi][wakapi] & [Hakatime][hakatime] are possible |
82
-
|`REPOSITORY`|`<gh_username>/<gh_username>`|`<gh_username>/<repo_name>`| Waka-readme stats will appear on the provided repository |
83
-
|`SECTION_NAME`|`waka`| Any alphanumeric string | The generator will look for this section to fill up the readme. |
84
-
|`COMMIT_MESSAGE`|`Updated waka-readme graph with new metrics`| Any string | Messaged used when committing updated stats |
85
-
|`CODE_LANG`|`txt`|`python``ruby``json` , you can use other languages also | Language syntax to format the generated text, to get colored text. |
86
-
|`SHOW_TITLE`|`false`|`false`, `true`| Add title to waka-readme stats blob |
87
-
|`BLOCKS`|`░▒▓█`|`░▒▓█`, `⣀⣄⣤⣦⣶⣷⣿`, `-#`, you can be creative! | Ascii art used to build stats graph |
88
-
|`TIME_RANGE`|`last_7_days`|`last_7_days`, `last_30_days`, `last_6_months`, `last_year`, `all_time`| String representing a dispensation from which stats are aggregated |
89
-
|`SHOW_TIME`|`true`|`false`, `true`| Displays the amount of time spent for each language |
90
-
|`SHOW_TOTAL`|`false`|`false`, `true`| Show total coding time |
91
-
|`SHOW_MASKED_TIME`|`false`|`false`, `true`| Adds total coding time including unclassified languages (overrides: `SHOW_TOTAL`) |
92
-
|`LANG_COUNT`|`5`| Any reasonable number | Number of languages to be displayed |
93
-
|`STOP_AT_OTHER`|`false`|`false`, `true`| Stop when language marked as `Other` is retrieved (overrides: `LANG_COUNT`) |
79
+
There are many flags that you can tweak as you wish!
|`SHOW_TITLE`|`false`, `true`| Add title to waka-readme stats blob |
93
+
|`SECTION_NAME`|`waka`, any alphanumeric string | The generator will look for section name to fill up the readme. |
94
+
|`BLOCKS`|`░▒▓█`, `⣀⣄⣤⣦⣶⣷⣿`, `-#`, `=>`, you can be creative | Ascii art used to build stats graph |
95
+
|`CODE_LANG`|`txt`, `python``ruby``json` , you can use other languages also | Language syntax based highlighted text |
96
+
|`TIME_RANGE`|`last_7_days`, `last_30_days`, `last_6_months`, `last_year`, `all_time`| String representing a dispensation from which stats are aggregated |
97
+
|`LANG_COUNT`|`5`, any plausible number | Number of languages to be displayed |
98
+
|`SHOW_TIME`|`true`, `false`| Displays the amount of time spent for each language |
99
+
|`SHOW_TOTAL`|`false`, `true`| Show total coding time |
100
+
|`SHOW_MASKED_TIME`|`false`, `true`| Adds total coding time including unclassified languages (overrides: `SHOW_TOTAL`) |
101
+
|`STOP_AT_OTHER`|`false`, `true`| Stop when language marked as `Other` is retrieved (overrides: `LANG_COUNT`) |
102
+
103
+
### Commit Tweaks
104
+
105
+
| Environment flag | Options (`Default`, `Other`, ...) |
|`COMMIT_MESSAGE`|`Updated waka-readme graph with new metrics`, any reasonable message |
108
+
|`TARGET_BRANCH`|`NOT_SET`, target branch name |
109
+
|`TARGET_PATH`|`NOT_SET`, `/path/to/target/file`|
110
+
|`COMMITTER_NAME`|`NOT_SET`, committer name |
111
+
|`COMMITTER_EMAIL`|`NOT_SET`, committer email |
112
+
|`AUTHOR_NAME`|`NOT_SET`, author name |
113
+
|`AUTHOR_EMAIL`|`NOT_SET`, author email |
114
+
115
+
All of these flags are _optional_.
94
116
95
117
# Example
96
118
@@ -112,15 +134,40 @@ jobs:
112
134
steps:
113
135
- uses: athul/waka-readme@master
114
136
with:
137
+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
115
138
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
139
+
# meta
140
+
API_BASE_URL: https://wakatime.com/api
141
+
REPOSITORY: athul/athul
142
+
# content
116
143
SHOW_TITLE: true
144
+
SECTION_NAME: waka
117
145
BLOCKS: ->
118
-
TIME_RANGE: all_time
119
-
SHOW_TIME: true
120
-
SHOW_MASKED_TIME: true
146
+
CODE_LANG: all_time
147
+
TIME_RANGE: true
121
148
LANG_COUNT: 10
149
+
SHOW_TIME: true
150
+
SHOW_TOTAL: true
151
+
SHOW_MASKED_TIME: false
152
+
STOP_AT_OTHER: true
153
+
# commit
154
+
COMMIT_MESSAGE: Updated waka-readme graph with new metrics
155
+
TARGET_BRANCH: master
156
+
TARGET_PATH: README.md
157
+
COMMITTER_NAME: GitHubActionBot
158
+
COMMITTER_EMAIL: action-bot@github.org
159
+
AUTHOR_NAME: Athul
160
+
AUTHOR_EMAIL: athul@example.org
161
+
# you can populate email-id with secretes instead
122
162
```
123
163
164
+
> Note:
165
+
>
166
+
> - Flags `REPOSITORY` and `GH_TOKEN` are required, ONLY if you're NOT using [profile readme][profile_readme].
167
+
> -`WAKATIME_API_KEY` is a required secret.
168
+
> - Every other environment variables is optional.
169
+
> - The above example does not show proper default values, refer [#Tweaks](#tweaks) for the same.
170
+
124
171
**`README.md`**
125
172
126
173
```md
@@ -140,10 +187,6 @@ Other 47 hrs 58 mins >------------------------ 03.05 %
140
187
141
188
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:
142
189
143
-
---
144
-
145
-
<sup>\*</sup>`REPOSITORY` flag and `GH_TOKEN` secret are required you're not using profile readme.
0 commit comments