doc(plugins/wakatime): update

This commit is contained in:
lowlighter
2022-01-15 20:17:28 -05:00
parent 37da1d959a
commit efad2c8e30
2 changed files with 85 additions and 60 deletions

View File

@@ -1,26 +1,28 @@
### ⏰ WakaTime plugin <!--header-->
The *wakatime* plugin displays statistics from your [WakaTime](https://wakatime.com) account.
<table> <table>
<td align="center"> <tr><th colspan="2"><h3>⏰ WakaTime plugin</h3></th></tr>
<img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.wakatime.svg"> <tr><td colspan="2" align="center"><p>This plugin displays statistics from your <a href="https://wakatime.com">WakaTime</a> account.</p>
<img width="900" height="1" alt=""> </td></tr>
</td> <tr>
<th rowspan="3">Supported features<br><sub><a href="metadata.yml">→ Full specification</a></sub></th>
<td><a href="/source/templates/classic"><code>📗 Classic template</code></a></td>
</tr>
<tr>
<td><code>👤 Users</code></td>
</tr>
<tr>
<td><code>🗝️ plugin_wakatime_token</code></td>
</tr>
<tr>
<td colspan="2" align="center">
<img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.wakatime.svg" alt=""></img>
<img width="900" height="1" alt="">
</td>
</tr>
</table> </table>
<!--/header-->
<details> ## ➡️ Available options
<summary>💬 Obtaining a WakaTime token</summary>
Create a [WakaTime account](https://wakatime.com) and retrieve your API key in your [Account settings](https://wakatime.com/settings/account).
![WakaTime API token](/.github/readme/imgs/plugin_wakatime_token.png)
Then setup [WakaTime plugins](https://wakatime.com/plugins) to be ready to go!
</details>
#### ➡️ Available options
<!--options--> <!--options-->
<table> <table>
@@ -29,7 +31,7 @@ Then setup [WakaTime plugins](https://wakatime.com/plugins) to be ready to go!
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"><code>plugin_wakatime</code></td> <td nowrap="nowrap"><code>plugin_wakatime</code></td>
<td rowspan="2"><p>Display WakaTime stats</p> <td rowspan="2"><p>Enable wakatime plugin</p>
<img width="900" height="1" alt=""></td> <img width="900" height="1" alt=""></td>
</tr> </tr>
<tr> <tr>
@@ -49,7 +51,7 @@ Then setup [WakaTime plugins](https://wakatime.com/plugins) to be ready to go!
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"><code>plugin_wakatime_days</code></td> <td nowrap="nowrap"><code>plugin_wakatime_days</code></td>
<td rowspan="2"><p>WakaTime time range</p> <td rowspan="2"><p>Time range</p>
<img width="900" height="1" alt=""></td> <img width="900" height="1" alt=""></td>
</tr> </tr>
<tr> <tr>
@@ -60,7 +62,18 @@ Then setup [WakaTime plugins](https://wakatime.com/plugins) to be ready to go!
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"><code>plugin_wakatime_sections</code></td> <td nowrap="nowrap"><code>plugin_wakatime_sections</code></td>
<td rowspan="2"><p>Sections to display</p> <td rowspan="2"><p>Displayed sections</p>
<ul>
<li><code>time</code>: show total coding time and daily average</li>
<li><code>projects</code>: show most time spent project</li>
<li><code>projects-graphs</code>: show most time spent projects graphs</li>
<li><code>languages</code>: show most language</li>
<li><code>languages-graphs</code>: show languages graphs</li>
<li><code>editors</code>: show most used code editor</li>
<li><code>editors-graphs</code>: show code editors graphs</li>
<li><code>os</code>: show most used operating system</li>
<li><code>os-graphs</code>: show code operating systems graphs</li>
</ul>
<img width="900" height="1" alt=""></td> <img width="900" height="1" alt=""></td>
</tr> </tr>
<tr> <tr>
@@ -71,7 +84,7 @@ Then setup [WakaTime plugins](https://wakatime.com/plugins) to be ready to go!
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"><code>plugin_wakatime_limit</code></td> <td nowrap="nowrap"><code>plugin_wakatime_limit</code></td>
<td rowspan="2"><p>Maximum number of entries to display per graph</p> <td rowspan="2"><p>Display limit (per graph)</p>
<img width="900" height="1" alt=""></td> <img width="900" height="1" alt=""></td>
</tr> </tr>
<tr> <tr>
@@ -79,11 +92,13 @@ Then setup [WakaTime plugins](https://wakatime.com/plugins) to be ready to go!
<i>(0 ≤ <i>(0 ≤
𝑥)</i> 𝑥)</i>
<br> <br>
<b>zero behaviour:</b> disable</br>
<b>default:</b> 5<br></td> <b>default:</b> 5<br></td>
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"><code>plugin_wakatime_url</code></td> <td nowrap="nowrap"><code>plugin_wakatime_url</code></td>
<td rowspan="2"><p>Address where to reach your Wakatime instance</p> <td rowspan="2"><p>WakaTime url</p>
<p>Also compatible with self-hosted instance (<a href="https://github.com/muety/wakapi">wakapi</a>)</p>
<img width="900" height="1" alt=""></td> <img width="900" height="1" alt=""></td>
</tr> </tr>
<tr> <tr>
@@ -93,7 +108,7 @@ Then setup [WakaTime plugins](https://wakatime.com/plugins) to be ready to go!
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"><code>plugin_wakatime_user</code></td> <td nowrap="nowrap"><code>plugin_wakatime_user</code></td>
<td rowspan="2"><p>Your Wakatime user on the selfhosted Wakapi instance</p> <td rowspan="2"><p>WakaTime username</p>
<img width="900" height="1" alt=""></td> <img width="900" height="1" alt=""></td>
</tr> </tr>
<tr> <tr>
@@ -104,9 +119,15 @@ Then setup [WakaTime plugins](https://wakatime.com/plugins) to be ready to go!
</table> </table>
<!--/options--> <!--/options-->
*[→ Full specification](metadata.yml)* ## 🗝️ Obtaining a WakaTime token
#### Examples workflows Create a [WakaTime account](https://wakatime.com) and retrieve API key in [Account settings](https://wakatime.com/settings/account).
![WakaTime API token](/.github/readme/imgs/plugin_wakatime_token.png)
Then setup [WakaTime plugins](https://wakatime.com/plugins) to be ready to go!
## Examples workflows
<!--examples--> <!--examples-->
```yaml ```yaml

View File

@@ -1,71 +1,75 @@
name: "⏰ WakaTime plugin" name: "⏰ WakaTime plugin"
category: social category: social
description: This plugin displays statistics from your [WakaTime](https://wakatime.com) account.
examples:
default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.wakatime.svg
index: 7 index: 7
supports: supports:
- user - user
scopes: [] scopes: []
inputs: inputs:
# Enable or disable plugin
plugin_wakatime: plugin_wakatime:
description: Display WakaTime stats description: Enable wakatime plugin
type: boolean type: boolean
default: no default: no
# WakaTime API token
# See https://wakatime.com/settings/account get your API key
plugin_wakatime_token: plugin_wakatime_token:
description: WakaTime API token description: WakaTime API token
type: token type: token
default: "" default: ""
# Time range to use for displayed stats
plugin_wakatime_days: plugin_wakatime_days:
description: WakaTime time range description: Time range
type: string type: string
values: values:
- 7 # Last week - 7
- 30 # Last month - 30
- 180 # Last 6 months - 180
- 365 # Last year - 365
default: 7 default: 7
# Sections to display
plugin_wakatime_sections: plugin_wakatime_sections:
description: Sections to display description: |
Displayed sections
- `time`: show total coding time and daily average
- `projects`: show most time spent project
- `projects-graphs`: show most time spent projects graphs
- `languages`: show most language
- `languages-graphs`: show languages graphs
- `editors`: show most used code editor
- `editors-graphs`: show code editors graphs
- `os`: show most used operating system
- `os-graphs`: show code operating systems graphs
type: array type: array
values: values:
- time # Show total coding time and daily average - time
- projects # Show most time spent project - projects
- projects-graphs # Show most time spent projects graphs - projects-graphs
- languages # Show most language - languages
- languages-graphs # Show languages graphs - languages-graphs
- editors # Show most used code editor - editors
- editors-graphs # Show code editors graphs - editors-graphs
- os # Show most used operating system - os
- os-graphs # Show code operating systems graphs - os-graphs
default: time, projects, projects-graphs, languages, languages-graphs, editors, os 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: plugin_wakatime_limit:
description: Maximum number of entries to display per graph description: Display limit (per graph)
type: number type: number
default: 5 default: 5
min: 0 min: 0
zero: disable
# If you use a selfhosted wakatime instance (wakapi)
# that is publicly available place your url here
#
# If you use the public wakapi instance the url
# would be https://wakapi.dev
plugin_wakatime_url: plugin_wakatime_url:
description: Address where to reach your Wakatime instance description: |
WakaTime url
Also compatible with self-hosted instance ([wakapi](https://github.com/muety/wakapi))
type: string type: string
default: https://wakatime.com default: https://wakatime.com
# Username on Wakatime
plugin_wakatime_user: plugin_wakatime_user:
description: Your Wakatime user on the selfhosted Wakapi instance description: WakaTime username
type: string type: string
default: current default: current