Back to Metrics

README

source/plugins/wakatime/README.md

3.346.1 KB
Original Source
<!--header--> <table> <tr><td colspan="2"><a href="/README.md#-plugins">← Back to plugins index</a></td></tr> <tr><th colspan="2"><h3>⏰ WakaTime</h3></th></tr> <tr><td colspan="2" align="center"><p>This plugin displays statistics from a <a href="https://wakatime.com">WakaTime</a> account.</p> <p>It is also compatible with self-hosted instances from <a href="https://github.com/muety/wakapi">wakapi</a>.</p> </td></tr> <tr><th>⚠️ Disclaimer</th><td><p>This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with <a href="https://wakatime.com">WakaTime</a>. All product and company names are trademarks™ or registered® trademarks of their respective holders.</p> </td></tr> <tr> <th rowspan="3">Supported features <sub><a href="metadata.yml">→ Full specification</a></sub></th> <td><a href="/source/templates/classic/README.md"><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>
</td>
</tr> </table> <!--/header-->

➡️ Available options

<!--options--> <table> <tr> <td align="center" nowrap="nowrap">Option</i></td><td align="center" nowrap="nowrap">Description</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_wakatime</code></h4></td> <td rowspan="2"><p>Enable wakatime plugin</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>boolean</code>

<b>default:</b> no

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_wakatime_token</code></h4></td> <td rowspan="2"><p>WakaTime API token</p> </td> </tr> <tr> <td nowrap="nowrap">🔐 Token

<b>type:</b> <code>token</code>

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_wakatime_url</code></h4></td> <td rowspan="2"><p>WakaTime URL</p> <p>Can be used to specify a <a href="https://github.com/muety/wakapi">wakapi</a> instance</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>string</code>

<b>default:</b> https://wakatime.com

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_wakatime_user</code></h4></td> <td rowspan="2"><p>WakaTime username</p> </td> </tr> <tr> <td nowrap="nowrap">⏯️ Cannot be preset

<b>type:</b> <code>string</code>

<b>default:</b> current

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_wakatime_sections</code></h4></td> <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 used 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 operating systems graphs</li> </ul> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>array</code>

<b>default:</b> time, projects, projects-graphs, languages, languages-graphs, editors, os

<b>allowed values:</b><ul><li>time</li><li>projects</li><li>projects-graphs</li><li>languages</li><li>languages-graphs</li><li>editors</li><li>editors-graphs</li><li>os</li><li>os-graphs</li></ul></td>

</tr> <tr> <td nowrap="nowrap"><h4><code>plugin_wakatime_days</code></h4></td> <td rowspan="2"><p>Time range</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>string</code>

<b>default:</b> 7

<b>allowed values:</b><ul><li>7</li><li>30</li><li>180</li><li>365</li></ul></td>

</tr> <tr> <td nowrap="nowrap"><h4><code>plugin_wakatime_limit</code></h4></td> <td rowspan="2"><p>Display limit (entries per graph)</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>number</code> <i>(0 ≤ 𝑥)</i>

<b>zero behaviour:</b> disable</br> <b>default:</b> 5

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_wakatime_languages_other</code></h4></td> <td rowspan="2"><p>Other languages</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>boolean</code>

<b>default:</b> no

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_wakatime_languages_ignored</code></h4></td> <td rowspan="2"><p>Ignored languages</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>array</code> <i>(comma-separated)</i> </td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_wakatime_repositories_visibility</code></h4></td> <td rowspan="2"><p>Repositories visibility</p> <p>Can be used to toggle private activity visibility</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>string</code>

<b>default:</b> all

<b>allowed values:</b><ul><li>public</li><li>all</li></ul></td>

</tr> </table> <!--/options-->

🗝️ Obtaining a WakaTime token

Create a WakaTime account and retrieve API key in Account settings.

Then setup WakaTime plugins to be ready to go!

ℹ️ Examples workflows

<!--examples-->
yaml
name: WakaTime
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.wakatime.svg
  token: NOT_NEEDED
  base: ""
  plugin_wakatime: yes
  plugin_wakatime_sections: time, projects, projects-graphs, languages, languages-graphs, editors, os
  plugin_wakatime_token: ${{ secrets.WAKATIME_TOKEN }}

<!--/examples-->