ci: auto-regenerate files

This commit is contained in:
lowlighter
2022-11-21 19:08:23 -05:00
parent 24029ffa89
commit 99b1c5bd86
7 changed files with 125 additions and 16 deletions

View File

@@ -55,12 +55,11 @@ Generate metrics that can be embedded everywhere, including your GitHub profile
-%> -%>
<tr> <tr>
<% } %> <th><% if (plugin) { %><a href="source/plugins/community/<%= plugin %>/README.md"><%= name -%></a><br><sup>by <%- authors.map(author => `<a href="https://github.com/${author}">@${author}</a>`).join(" ") %></sup> <% } %> <th><% if (plugin) { %><a href="source/plugins/community/<%= plugin %>/README.md"><%= name -%></a><br><sup>by <%- authors.map(author => `<a href="https://github.com/${author}">@${author}</a>`).join(" ") %></sup>
<%- readme.demo.replace(/<td.*?>([\s\S]+?)<\/td>/, `<details><summary>Render example</summary>$1</details>`).replace(/<img src=/g, `<img alt="" width="400" src=`)?.split("\n")?.map((x, i) => i ? ` ${x}` : x)?.join("\n") %> <%- readme.demo.replace(/<td.*?>([\s\S]+?)<\/td>/, ` <details><summary>Render example</summary>$1</details>`).replace(/<img src=/g, `<img alt="" width="400" src=`)?.split("\n")?.map((x, i) => i ? ` ${x}` : x)?.join("\n") %><% } %>
<% } %>
</th> </th>
<% if (cell === "odd") { <% if (cell === "odd") {
-%> </tr> -%> </tr>
<% }}}} %> <% }}}} %><%# -%>
<% { <% {
let cell = 0 let cell = 0
const elements = Object.entries(templates).filter(([key, value]) => (value)&&(!["community"].includes(key))) const elements = Object.entries(templates).filter(([key, value]) => (value)&&(!["community"].includes(key)))

View File

@@ -20,6 +20,8 @@ on:
required: true required: true
SPLATOON_TOKEN: SPLATOON_TOKEN:
required: true required: true
SPLATOON_STATINK_TOKEN:
required: true
SPOTIFY_TOKENS: SPOTIFY_TOKENS:
required: true required: true
STOCK_TOKEN: STOCK_TOKEN:
@@ -1149,7 +1151,7 @@ jobs:
user: lowlighter user: lowlighter
plugins_errors_fatal: yes plugins_errors_fatal: yes
if: ${{ success() || failure() }} if: ${{ success() || failure() }}
- name: 🦑 Splatoon - Example - name: 🦑 Splatoon - Splatnet data with stat.ink integration
uses: lowlighter/metrics@master uses: lowlighter/metrics@master
with: with:
filename: metrics.plugin.splatoon.svg filename: metrics.plugin.splatoon.svg
@@ -1157,6 +1159,8 @@ jobs:
base: "" base: ""
plugin_splatoon: yes plugin_splatoon: yes
plugin_splatoon_token: ${{ secrets.SPLATOON_TOKEN }} plugin_splatoon_token: ${{ secrets.SPLATOON_TOKEN }}
plugin_splatoon_statink: yes
plugin_splatoon_statink_token: ${{ secrets.SPLATOON_STATINK_TOKEN }}
extras_css: | extras_css: |
h2 { display: none !important; } h2 { display: none !important; }
output_action: none output_action: none

View File

@@ -19,7 +19,7 @@ Generate metrics that can be embedded everywhere, including your GitHub profile
</tr> </tr>
<tr> <tr>
<th colspan="2" align="center"> <th colspan="2" align="center">
<h3><a href="/README.md#-plugins">🧩 Customizable with 43 plugins and 307 options!</a></h3> <h3><a href="/README.md#-plugins">🧩 Customizable with 43 plugins and 309 options!</a></h3>
</th> </th>
</tr> </tr>
<tr> <tr>
@@ -305,7 +305,58 @@ Generate metrics that can be embedded everywhere, including your GitHub profile
<a href="/source/plugins/community/README.md">🎲 See also community plugins</a> <a href="/source/plugins/community/README.md">🎲 See also community plugins</a>
</th> </th>
</tr> </tr>
<tr>
<th><a href="source/plugins/community/chess/README.md">♟️ Chess</a><br><sup>by <a href="https://github.com/lowlighter">@lowlighter</a></sup>
<details><summary>Render example</summary>
<img alt="" width="400" src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.chess.svg" alt=""></img>
<img width="900" height="1" alt="">
</details>
</th>
<th><a href="source/plugins/community/fortune/README.md">🥠 Fortune</a><br><sup>by <a href="https://github.com/lowlighter">@lowlighter</a></sup>
<details><summary>Render example</summary>
<img alt="" width="400" src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.fortune.svg" alt=""></img>
<img width="900" height="1" alt="">
</details>
</th>
</tr>
<tr>
<th><a href="source/plugins/community/nightscout/README.md">💉 Nightscout</a><br><sup>by <a href="https://github.com/legoandmars">@legoandmars</a></sup>
<details><summary>Render example</summary>
<img alt="" width="400" src="https://github.com/legoandmars/legoandmars/blob/master/metrics.plugin.nightscout.svg" alt=""></img>
<img width="900" height="1" alt="">
</details>
</th>
<th><a href="source/plugins/community/poopmap/README.md">💩 PoopMap plugin</a><br><sup>by <a href="https://github.com/matievisthekat">@matievisthekat</a></sup>
<details><summary>Render example</summary>
<img alt="" width="400" src="https://github.com/matievisthekat/matievisthekat/blob/master/metrics.plugin.poopmap.svg" alt=""></img>
<img width="900" height="1" alt="">
</details>
</th>
</tr>
<tr>
<th><a href="source/plugins/community/screenshot/README.md">📸 Website screenshot</a><br><sup>by <a href="https://github.com/lowlighter">@lowlighter</a></sup>
<details><summary>Render example</summary>
<img alt="" width="400" src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.screenshot.svg" alt=""></img>
<img width="900" height="1" alt="">
</details>
</th>
<th><a href="source/plugins/community/splatoon/README.md">🦑 Splatoon</a><br><sup>by <a href="https://github.com/lowlighter">@lowlighter</a></sup>
<details><summary>Render example</summary>
<img alt="" width="400" src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.splatoon.svg" alt=""></img>
<img width="900" height="1" alt="">
</details>
</th>
</tr>
<tr>
<th><a href="source/plugins/community/stock/README.md">💹 Stock prices</a><br><sup>by <a href="https://github.com/lowlighter">@lowlighter</a></sup>
<details><summary>Render example</summary>
<img alt="" width="400" src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.stock.svg" alt=""></img>
<img width="900" height="1" alt="">
</details>
</th>
<th>
</th>
</tr>
<tr> <tr>
<th colspan="2" align="center"> <th colspan="2" align="center">
<h3><a href="/README.md#%EF%B8%8F-templates">🖼️ And even more with 4+ templates!</a></h3> <h3><a href="/README.md#%EF%B8%8F-templates">🖼️ And even more with 4+ templates!</a></h3>
@@ -361,6 +412,11 @@ Generate metrics that can be embedded everywhere, including your GitHub profile
<img src="/.github/readme/imgs/features_insights.gif" width="360"> <img src="/.github/readme/imgs/features_insights.gif" width="360">
</td> </td>
</tr> </tr>
<tr>
<td align="center" colspan="2">
Test latest features and patches on <code><a href="https://beta-metrics.lecoq.io">🧪 Metrics beta</a></code>!
</td>
</tr>
<tr> <tr>
<td align="center" colspan="2"> <td align="center" colspan="2">
<b>Power user?</b><br> <b>Power user?</b><br>

8
action.yml generated
View File

@@ -1345,6 +1345,14 @@ inputs:
description: Display limit (Salmon run) description: Display limit (Salmon run)
default: <default-value> default: <default-value>
plugin_splatoon_statink:
description: stat.ink integration
default: <default-value>
plugin_splatoon_statink_token:
description: stat.ink token
default: <default-value>
# ==================================================================================== # ====================================================================================
# 💹 Stock prices # 💹 Stock prices

1
settings.example.json generated
View File

@@ -196,6 +196,7 @@
}, },
"splatoon":{ "splatoon":{
"token": "Splatnet token", "token": "Splatnet token",
"statink.token": null, "//": "stat.ink token",
"enabled": false, "//": "Enable splatoon plugin" "enabled": false, "//": "Enable splatoon plugin"
}, },
"stock":{ "stock":{

View File

@@ -3,8 +3,8 @@
<tr><th colspan="2"><h3>🎲 Community plugins</h3></th></tr> <tr><th colspan="2"><h3>🎲 Community plugins</h3></th></tr>
<tr><td colspan="2" align="center">Additional plugins maintained by community for even more features!</td></tr> <tr><td colspan="2" align="center">Additional plugins maintained by community for even more features!</td></tr>
<tr> <tr>
<th><a href="/source/plugins/community/chess/README.md">♟️ Chess</a></th> <th><a href="/source/plugins/community/chess/README.md">♟️ Chess</a><br><sup>by <a href="https://github.com/lowlighter">@lowlighter</a></sup></th>
<th><a href="/source/plugins/community/fortune/README.md">🥠 Fortune</a></th> <th><a href="/source/plugins/community/fortune/README.md">🥠 Fortune</a><br><sup>by <a href="https://github.com/lowlighter">@lowlighter</a></sup></th>
</tr> </tr>
<tr> <tr>
<td align="center"> <td align="center">
@@ -16,8 +16,8 @@
<img width="900" height="1" alt=""> <img width="900" height="1" alt="">
</td> </td>
</tr> <tr> </tr> <tr>
<th><a href="/source/plugins/community/nightscout/README.md">💉 Nightscout</a></th> <th><a href="/source/plugins/community/nightscout/README.md">💉 Nightscout</a><br><sup>by <a href="https://github.com/legoandmars">@legoandmars</a></sup></th>
<th><a href="/source/plugins/community/poopmap/README.md">💩 PoopMap plugin</a></th> <th><a href="/source/plugins/community/poopmap/README.md">💩 PoopMap plugin</a><br><sup>by <a href="https://github.com/matievisthekat">@matievisthekat</a></sup></th>
</tr> </tr>
<tr> <tr>
<td align="center"> <td align="center">
@@ -29,8 +29,8 @@
<img width="900" height="1" alt=""> <img width="900" height="1" alt="">
</td> </td>
</tr> <tr> </tr> <tr>
<th><a href="/source/plugins/community/screenshot/README.md">📸 Website screenshot</a></th> <th><a href="/source/plugins/community/screenshot/README.md">📸 Website screenshot</a><br><sup>by <a href="https://github.com/lowlighter">@lowlighter</a></sup></th>
<th><a href="/source/plugins/community/splatoon/README.md">🦑 Splatoon</a></th> <th><a href="/source/plugins/community/splatoon/README.md">🦑 Splatoon</a><br><sup>by <a href="https://github.com/lowlighter">@lowlighter</a></sup></th>
</tr> </tr>
<tr> <tr>
<td align="center"> <td align="center">
@@ -42,7 +42,7 @@
<img width="900" height="1" alt=""> <img width="900" height="1" alt="">
</td> </td>
</tr> <tr> </tr> <tr>
<th><a href="/source/plugins/community/stock/README.md">💹 Stock prices</a></th> <th><a href="/source/plugins/community/stock/README.md">💹 Stock prices</a><br><sup>by <a href="https://github.com/lowlighter">@lowlighter</a></sup></th>
<th></th> <th></th>
</tr> </tr>
<tr> <tr>

View File

@@ -18,7 +18,7 @@ All product and company names are trademarks™ or registered® trademarks of th
<td><code>👤 Users</code> <code>👥 Organizations</code></td> <td><code>👤 Users</code> <code>👥 Organizations</code></td>
</tr> </tr>
<tr> <tr>
<td><code>🗝️ plugin_splatoon_token</code></td> <td><code>🗝️ plugin_splatoon_token</code> <code>🗝️ plugin_splatoon_statink_token</code></td>
</tr> </tr>
<tr> <tr>
<td colspan="2" align="center"> <td colspan="2" align="center">
@@ -102,6 +102,34 @@ All product and company names are trademarks™ or registered® trademarks of th
<br> <br>
<b>default:</b> 1<br></td> <b>default:</b> 1<br></td>
</tr> </tr>
<tr>
<td nowrap="nowrap"><h4><code>plugin_splatoon_statink</code></h4></td>
<td rowspan="2"><p>stat.ink integration</p>
<p>If set, fetched data will also be uploaded to stat.ink
Requires <a href="/source/plugins/community/splatoon/README.md#plugin_splatoon_statink_token"><code>plugin_splatoon_statink_token</code></a> to be set</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
<td nowrap="nowrap">✨ On <code>master</code>/<code>main</code><br>
🌐 Web instances must configure <code>settings.json</code>:
<ul>
<li><i>metrics.api.statink</i></li>
</ul>
<b>type:</b> <code>boolean</code>
<br>
<b>default:</b> no<br></td>
</tr>
<tr>
<td nowrap="nowrap"><h4><code>plugin_splatoon_statink_token</code></h4></td>
<td rowspan="2"><p>stat.ink token</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
<td nowrap="nowrap">🔐 Token<br>
✨ On <code>master</code>/<code>main</code><br>
<b>type:</b> <code>token</code>
<br></td>
</tr>
</table> </table>
<!--/options--> <!--/options-->
@@ -139,7 +167,7 @@ Data are fetched using [spacemeowx2/s3si.ts](https://github.com/spacemeowx2/s3si
<!--examples--> <!--examples-->
```yaml ```yaml
name: Example name: Splatnet data
uses: lowlighter/metrics@latest uses: lowlighter/metrics@latest
with: with:
filename: metrics.plugin.splatoon.svg filename: metrics.plugin.splatoon.svg
@@ -147,6 +175,19 @@ with:
base: "" base: ""
plugin_splatoon: yes plugin_splatoon: yes
plugin_splatoon_token: ${{ secrets.SPLATOON_TOKEN }} plugin_splatoon_token: ${{ secrets.SPLATOON_TOKEN }}
```
```yaml
name: Splatnet data with stat.ink integration
uses: lowlighter/metrics@latest
with:
filename: metrics.plugin.splatoon.svg
token: ${{ secrets.METRICS_TOKEN }}
base: ""
plugin_splatoon: yes
plugin_splatoon_token: ${{ secrets.SPLATOON_TOKEN }}
plugin_splatoon_statink: yes
plugin_splatoon_statink_token: ${{ secrets.SPLATOON_STATINK_TOKEN }}
extras_css: | extras_css: |
h2 { display: none !important; } h2 { display: none !important; }