Back to Metrics

README

source/plugins/community/chess/README.md

3.344.3 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>♟️ Chess</h3></th></tr> <tr><td colspan="2" align="center"><p>This plugin displays the last game you played on a supported chess platform.</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 any of the supported provider. All product and company names are trademarks™ or registered® trademarks of their respective holders.</p> </td></tr> <tr><th>Authors</th><td><a href="https://github.com/lowlighter">@lowlighter</a></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> <code>👥 Organizations</code> <code>📓 Repositories</code></td> </tr> <tr> <td><code>🗝️ plugin_chess_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_chess</code></h4></td> <td rowspan="2"><p>Enable chess 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_chess_token</code></h4></td> <td rowspan="2"><p>Chess platform token</p> </td> </tr> <tr> <td nowrap="nowrap">🔐 Token

🌐 Web instances must configure <code>settings.json</code>:

<ul> <li><i>metrics.api.chess.any</i></li> </ul> <b>type:</b> <code>token</code> </td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_chess_user</code></h4></td> <td rowspan="2"><p>Chess platform login</p> </td> </tr> <tr> <td nowrap="nowrap">⏯️ Cannot be preset

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

<b>default:</b> <code>→ User login</code>

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_chess_platform</code></h4></td> <td rowspan="2"><p>Chess platform</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>string</code>

<b>allowed values:</b><ul><li>lichess.org</li></ul></td>

</tr> <tr> <td nowrap="nowrap"><h4><code>plugin_chess_animation</code></h4></td> <td rowspan="2"><p>Animation settings</p> <ul> <li><code>size</code> is the size of a single chessboard square in pixels (board will be 8 times larger)</li> <li><code>delay</code> is the delay before starting animation (in seconds)</li> <li><code>duration</code> is the duration of the animation of a move (in seconds)</li> </ul> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>json</code>

<b>default:</b> <details><summary>→ Click to expand</summary><pre language="json"><code>{ "size": 40, "delay": 3, "duration": 0.6 } </code></pre></details>

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

🗝️ Obtaining a lichess.org token

Create a lichess.org account and select API access tokens to get a token.

It is not necessary to add additional scopes:

Create token and store it in your secrets:

ℹ️ Examples workflows

<!--examples-->
yaml
name: Last chess game from lichess.org
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.chess.svg
  token: NOT_NEEDED
  base: ""
  plugin_chess: yes
  plugin_chess_token: ${{ secrets.CHESS_TOKEN }}
  plugin_chess_platform: lichess.org

<!--/examples-->