diff --git a/README.md b/README.md
index 4f86720a..30564fd9 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ Generate your metrics that you can embed everywhere, including your GitHub profi
|
- 🧩 18 plugins
+ 🧩 19 plugins
|
@@ -190,6 +190,17 @@ Generate your metrics that you can embed everywhere, including your GitHub profi
+
+ | ⏰ WakaTime plugin |
+ |
+
+
+
+
+
+ |
+ ![]() |
+
|
More to come soon!
@@ -549,6 +560,7 @@ https://my-personal-domain.com/my-github-user?base=0&base.repositories=1
| 📌 |
🧮 |
🐤 |
+ ⏰ |
| 📗 Classic |
@@ -571,6 +583,7 @@ https://my-personal-domain.com/my-github-user?base=0&base.repositories=1
✔️ |
✔️ |
✔️ |
+ ✔️ |
| 📘 Repository |
@@ -593,6 +606,7 @@ https://my-personal-domain.com/my-github-user?base=0&base.repositories=1
❌ |
✔️ |
❌ |
+ ❌ |
| 📙 Terminal |
@@ -615,6 +629,7 @@ https://my-personal-domain.com/my-github-user?base=0&base.repositories=1
❌ |
✔️ |
❌ |
+ ❌ |
@@ -653,6 +668,7 @@ See their respective documentation for more informations about how to setup them
* [📌 Starred topics](/source/plugins/topics/README.md)
* [🧮 Repositories traffic](/source/plugins/traffic/README.md)
* [🐤 Latest tweets](/source/plugins/tweets/README.md)
+* [⏰ WakaTime plugin](/source/plugins/wakatime/README.md)
### 🏦 Organizations metrics
diff --git a/action.yml b/action.yml
index a834aa8b..8e962d45 100644
--- a/action.yml
+++ b/action.yml
@@ -555,6 +555,36 @@ inputs:
description: Twitter username
default: .user.twitter
+ # ====================================================================================
+ # ⏰ WakaTime plugin
+
+ # Enable or disable plugin
+ plugin_wakatime:
+ description: Display WakaTime stats
+ default: no
+
+ # WakaTime API token
+ # See https://wakatime.com/settings/account get your API key
+ plugin_wakatime_token:
+ description: WakaTime API token
+ default: ""
+
+ # Time range to use for displayed stats
+ plugin_wakatime_days:
+ description: WakaTime time range
+ default: 7
+
+ # Sections to display
+ plugin_wakatime_sections:
+ description: Sections to display
+ default: time, projects, projects-graphs, languages, languages-graphs, editors, os
+
+ # Number of entries to display per graph
+ # Set to 0 to disable limitations
+ plugin_wakatime_limit:
+ description: Maximum number of entries to display per graph
+ default: 5
+
# ====================================================================================
# Action metadata
diff --git a/settings.example.json b/settings.example.json
index 1ee3aa88..ececa048 100644
--- a/settings.example.json
+++ b/settings.example.json
@@ -78,6 +78,10 @@
"token": null, "//":"Twitter API token",
"enabled": false, "//": "Display recent tweets"
},
+ "wakatime":{
+ "token": null, "//":"WakaTime API token",
+ "enabled": false, "//": "Display WakaTime stats"
+ },
"//": ""
}
}
\ No newline at end of file
diff --git a/source/app/web/instance.mjs b/source/app/web/instance.mjs
index 6298f7ce..6e6f18e3 100644
--- a/source/app/web/instance.mjs
+++ b/source/app/web/instance.mjs
@@ -27,7 +27,7 @@
//Auto-enable plugin if needed
if (conf.settings["plugins.default"])
settings.plugins[plugin].enabled = settings.plugins[plugin].enabled ?? (console.debug(`metrics/app > auto-enabling ${plugin}`), true)
- //Mock plugins state and tokens if they're undefined
+ //Mock plugins tokens if they're undefined
if (mock) {
const tokens = Object.entries(conf.metadata.plugins[plugin].inputs).filter(([key, value]) => (!/^plugin_/.test(key))&&(value.type === "token")).map(([key]) => key)
for (const token of tokens) {
diff --git a/source/plugins/README.md b/source/plugins/README.md
index 05c6b128..dc642e6d 100644
--- a/source/plugins/README.md
+++ b/source/plugins/README.md
@@ -23,3 +23,4 @@ See their respective documentation for more informations about how to setup them
* [📌 Starred topics](/source/plugins/topics/README.md)
* [🧮 Repositories traffic](/source/plugins/traffic/README.md)
* [🐤 Latest tweets](/source/plugins/tweets/README.md)
+* [⏰ WakaTime plugin](/source/plugins/wakatime/README.md)