From 1b4b2b1a9ccc92ef1f56fb0eecbf69119e0b3d47 Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Sat, 23 Apr 2022 21:11:28 -0400 Subject: [PATCH] ci: auto-regenerate files --- .../partials/documentation/compatibility.md | 29 ++- .github/workflows/examples.yml | 201 ++++++++++-------- README.md | 33 ++- action.yml | 97 +++++---- settings.example.json | 11 +- source/plugins/README.md | 1 + source/plugins/calendar/README.md | 71 +++++++ source/plugins/calendar/metadata.yml | 1 + source/plugins/music/metadata.yml | 2 +- source/plugins/rss/metadata.yml | 2 +- source/plugins/skyline/metadata.yml | 2 +- source/plugins/sponsors/README.md | 3 +- source/plugins/wakatime/metadata.yml | 2 +- source/templates/classic/README.md | 2 +- tests/cases/calendar.plugin.yml | 15 ++ 15 files changed, 311 insertions(+), 161 deletions(-) create mode 100644 tests/cases/calendar.plugin.yml diff --git a/.github/readme/partials/documentation/compatibility.md b/.github/readme/partials/documentation/compatibility.md index ced49452..06f50aa9 100644 --- a/.github/readme/partials/documentation/compatibility.md +++ b/.github/readme/partials/documentation/compatibility.md @@ -29,13 +29,14 @@ 🙋 💕 đŸ’Ģ + 📆 🌇 âąī¸ - đŸŽŧ đŸ—¨ī¸ 🌸 🐤 âœ’ī¸ + đŸŽŧ đŸ—ŧ ⏰ @@ -67,13 +68,14 @@ âœ”ī¸ âœ”ī¸ âœ”ī¸ + âœ”ī¸ âœ”ī¸ âœ”ī¸ - âœ”ī¸ âœ”ī¸ âœ”ī¸ âœ”ī¸ âœ”ī¸ + âœ”ī¸ âœ”ī¸ âœ”ī¸ @@ -105,13 +107,14 @@ âœ”ī¸ âœ”ī¸ ❌ + ❌ ❌ âœ”ī¸ - ❌ ❌ ❌ ❌ âœ”ī¸ + ❌ âœ”ī¸ ❌ @@ -143,13 +146,14 @@ ❌ ❌ ❌ + ❌ ❌ âœ”ī¸ - ❌ ❌ ❌ ❌ ❌ + ❌ ❌ ❌ @@ -181,18 +185,19 @@ ✓ ✓ ✓ + ✓ ✓ ✓ - ✓ ✓ ✓ âœ”ī¸ âœ”ī¸ + ✓ âœ”ī¸ ✓ - + Mode/Plugin @@ -222,13 +227,14 @@ 🙋 💕 đŸ’Ģ + 📆 🌇 âąī¸ - đŸŽŧ đŸ—¨ī¸ 🌸 🐤 âœ’ī¸ + đŸŽŧ đŸ—ŧ ⏰ @@ -260,13 +266,14 @@ âœ”ī¸ âœ”ī¸ âœ”ī¸ + âœ”ī¸ âœ”ī¸ âœ”ī¸ - âœ”ī¸ âœ”ī¸ âœ”ī¸ âœ”ī¸ âœ”ī¸ + âœ”ī¸ âœ”ī¸ âœ”ī¸ @@ -298,13 +305,14 @@ âœ”ī¸ âœ”ī¸ ❌ + ❌ ❌ âœ”ī¸ - âœ”ī¸ âœ”ī¸ âœ”ī¸ âœ”ī¸ âœ”ī¸ + âœ”ī¸ âœ”ī¸ ❌ @@ -336,13 +344,14 @@ âœ”ī¸ âœ”ī¸ ❌ + ❌ ❌ âœ”ī¸ - ❌ ❌ ❌ ❌ âœ”ī¸ + ❌ âœ”ī¸ ❌ diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 24a5a285..0daa958f 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -697,6 +697,31 @@ jobs: user: lowlighter plugins_errors_fatal: yes if: ${{ success() || failure() }} + - name: 📆 Calendar - Current year calendar + uses: lowlighter/metrics@master + with: + filename: metrics.plugin.calendar.svg + token: ${{ secrets.METRICS_TOKEN }} + base: "" + plugin_calendar: yes + output_action: none + delay: 120 + user: lowlighter + plugins_errors_fatal: yes + if: ${{ success() || failure() }} + - name: 📆 Calendar - Full history calendar + uses: lowlighter/metrics@master + with: + filename: metrics.plugin.calendar.full.svg + token: ${{ secrets.METRICS_TOKEN }} + base: "" + plugin_calendar: yes + plugin_calendar_limit: 0 + output_action: none + delay: 120 + user: lowlighter + plugins_errors_fatal: yes + if: ${{ success() || failure() }} - name: 🌇 GitHub Skyline 3D calendar - GitHub Skyline uses: lowlighter/metrics@master with: @@ -756,94 +781,6 @@ jobs: user: lowlighter plugins_errors_fatal: yes if: ${{ success() || failure() }} - - name: đŸŽŧ Music plugin - Apple Music - Random track from playlist - uses: lowlighter/metrics@master - with: - filename: metrics.plugin.music.playlist.svg - token: NOT_NEEDED - base: "" - plugin_music: yes - plugin_music_playlist: https://embed.music.apple.com/fr/playlist/usr-share/pl.u-V9D7m8Etjmjd0D - plugin_music_limit: 2 - output_action: none - delay: 120 - user: lowlighter - plugins_errors_fatal: yes - if: ${{ success() || failure() }} - - name: đŸŽŧ Music plugin - Spotify - Random track from playlist - uses: lowlighter/metrics@master - with: - filename: metrics.plugin.music.playlist.spotify.svg - token: NOT_NEEDED - base: "" - plugin_music: yes - plugin_music_playlist: https://open.spotify.com/embed/playlist/3nfA87oeJw4LFVcUDjRcqi - output_action: none - delay: 120 - user: lowlighter - plugins_errors_fatal: yes - if: ${{ success() || failure() }} - - name: đŸŽŧ Music plugin - Spotify - Recently listed - uses: lowlighter/metrics@master - with: - filename: metrics.plugin.music.recent.svg - token: NOT_NEEDED - base: "" - plugin_music: yes - plugin_music_provider: spotify - plugin_music_mode: recent - plugin_music_token: ${{ secrets.SPOTIFY_TOKENS }} - plugin_music_limit: 2 - output_action: none - delay: 120 - user: lowlighter - plugins_errors_fatal: yes - if: ${{ success() || failure() }} - - name: đŸŽŧ Music plugin - Spotify - Top tracks - uses: lowlighter/metrics@master - with: - token: NOT_NEEDED - base: "" - plugin_music: yes - plugin_music_mode: top - plugin_music_provider: spotify - plugin_music_token: ${{ secrets.SPOTIFY_TOKENS }} - plugin_music_time_range: short - plugin_music_top_type: tracks - output_action: none - delay: 120 - user: lowlighter - plugins_errors_fatal: yes - if: ${{ success() || failure() }} - - name: đŸŽŧ Music plugin - Spotify - Top artists - uses: lowlighter/metrics@master - with: - token: NOT_NEEDED - base: "" - plugin_music: yes - plugin_music_mode: top - plugin_music_provider: spotify - plugin_music_token: ${{ secrets.SPOTIFY_TOKENS }} - plugin_music_time_range: long - plugin_music_top_type: artists - output_action: none - delay: 120 - user: lowlighter - plugins_errors_fatal: yes - if: ${{ success() || failure() }} - - name: đŸŽŧ Music plugin - Youtube Music - Random track from playlist - uses: lowlighter/metrics@master - with: - token: NOT_NEEDED - base: "" - plugin_music: yes - plugin_music_playlist: >- - https://music.youtube.com/playlist?list=OLAK5uy_kU_uxp9TUOl9zVdw77xith8o9AknVwz9U - output_action: none - delay: 120 - user: lowlighter - plugins_errors_fatal: yes - if: ${{ success() || failure() }} - name: đŸ—¨ī¸ StackOverflow plugin - Top answers from stackoverflow uses: lowlighter/metrics@master with: @@ -966,6 +903,94 @@ jobs: user: lowlighter plugins_errors_fatal: yes if: ${{ success() || failure() }} + - name: đŸŽŧ Music plugin - Apple Music - Random track from playlist + uses: lowlighter/metrics@master + with: + filename: metrics.plugin.music.playlist.svg + token: NOT_NEEDED + base: "" + plugin_music: yes + plugin_music_playlist: https://embed.music.apple.com/fr/playlist/usr-share/pl.u-V9D7m8Etjmjd0D + plugin_music_limit: 2 + output_action: none + delay: 120 + user: lowlighter + plugins_errors_fatal: yes + if: ${{ success() || failure() }} + - name: đŸŽŧ Music plugin - Spotify - Random track from playlist + uses: lowlighter/metrics@master + with: + filename: metrics.plugin.music.playlist.spotify.svg + token: NOT_NEEDED + base: "" + plugin_music: yes + plugin_music_playlist: https://open.spotify.com/embed/playlist/3nfA87oeJw4LFVcUDjRcqi + output_action: none + delay: 120 + user: lowlighter + plugins_errors_fatal: yes + if: ${{ success() || failure() }} + - name: đŸŽŧ Music plugin - Spotify - Recently listed + uses: lowlighter/metrics@master + with: + filename: metrics.plugin.music.recent.svg + token: NOT_NEEDED + base: "" + plugin_music: yes + plugin_music_provider: spotify + plugin_music_mode: recent + plugin_music_token: ${{ secrets.SPOTIFY_TOKENS }} + plugin_music_limit: 2 + output_action: none + delay: 120 + user: lowlighter + plugins_errors_fatal: yes + if: ${{ success() || failure() }} + - name: đŸŽŧ Music plugin - Spotify - Top tracks + uses: lowlighter/metrics@master + with: + token: NOT_NEEDED + base: "" + plugin_music: yes + plugin_music_mode: top + plugin_music_provider: spotify + plugin_music_token: ${{ secrets.SPOTIFY_TOKENS }} + plugin_music_time_range: short + plugin_music_top_type: tracks + output_action: none + delay: 120 + user: lowlighter + plugins_errors_fatal: yes + if: ${{ success() || failure() }} + - name: đŸŽŧ Music plugin - Spotify - Top artists + uses: lowlighter/metrics@master + with: + token: NOT_NEEDED + base: "" + plugin_music: yes + plugin_music_mode: top + plugin_music_provider: spotify + plugin_music_token: ${{ secrets.SPOTIFY_TOKENS }} + plugin_music_time_range: long + plugin_music_top_type: artists + output_action: none + delay: 120 + user: lowlighter + plugins_errors_fatal: yes + if: ${{ success() || failure() }} + - name: đŸŽŧ Music plugin - Youtube Music - Random track from playlist + uses: lowlighter/metrics@master + with: + token: NOT_NEEDED + base: "" + plugin_music: yes + plugin_music_playlist: >- + https://music.youtube.com/playlist?list=OLAK5uy_kU_uxp9TUOl9zVdw77xith8o9AknVwz9U + output_action: none + delay: 120 + user: lowlighter + plugins_errors_fatal: yes + if: ${{ success() || failure() }} - name: đŸ—ŧ Rss feed - News from hackernews uses: lowlighter/metrics@master with: diff --git a/README.md b/README.md index b09997ea..523b1e33 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Generate metrics that can be embedded everywhere, including your GitHub profile -

🧩 Customizable with 39 plugins and 253 options!

+

🧩 Customizable with 40 plugins and 255 options!

@@ -208,7 +208,7 @@ Generate metrics that can be embedded everywhere, including your GitHub profile đŸ’Ģ Starlists - 🌇 GitHub Skyline 3D calendar + 📆 Calendar @@ -217,26 +217,26 @@ Generate metrics that can be embedded everywhere, including your GitHub profile - +
Current year
+
Full history
+ 🌇 GitHub Skyline 3D calendar âąī¸ Website performances - đŸŽŧ Music plugin + + + +
PageSpeed scores
PageSpeed scores with detailed report
PageSpeed scores with a website screenshot
- -
Random tracks from a playlist
-
Recently listened
- - đŸ—¨ī¸ StackOverflow plugin @@ -271,18 +271,30 @@ Generate metrics that can be embedded everywhere, including your GitHub profile + đŸŽŧ Music plugin đŸ—ŧ Rss feed - ⏰ WakaTime plugin + +
Random tracks from a playlist
+
Recently listened
+ + + + + ⏰ WakaTime plugin + + + + @@ -405,6 +417,7 @@ Plugins provide additional content and lets you customize rendered metrics. * **Github plugins** * [🏆 Achievements `achievements`](/source/plugins/achievements/README.md) * [📰 Recent activity `activity`](/source/plugins/activity/README.md) + * [📆 Calendar `calendar`](/source/plugins/calendar/README.md) * [♐ Code snippet of the day `code`](/source/plugins/code/README.md) * [🏅 Repository contributors `contributors`](/source/plugins/contributors/README.md) * [đŸ’Ŧ Discussions `discussions`](/source/plugins/discussions/README.md) diff --git a/action.yml b/action.yml index fed6e705..ac4847cd 100644 --- a/action.yml +++ b/action.yml @@ -796,6 +796,17 @@ inputs: description: Restrict display to specified star lists default: + # ==================================================================================== + # 📆 Calendar + + plugin_calendar: + description: Enable calendar plugin + default: + + plugin_calendar_limit: + description: Years to display + default: + # ==================================================================================== # 🌇 GitHub Skyline 3D calendar @@ -842,49 +853,6 @@ inputs: description: PageSpeed token default: - # ==================================================================================== - # đŸŽŧ Music plugin - - plugin_music: - description: Enable music plugin - default: - - plugin_music_provider: - description: Music provider - default: - - plugin_music_token: - description: Music provider token - default: - - plugin_music_mode: - description: Display mode - default: - - plugin_music_playlist: - description: Playlist URL - default: - - plugin_music_limit: - description: Display limit - default: - - plugin_music_played_at: - description: Recently played - Toggle last played timestamp display - default: - - plugin_music_time_range: - description: Top tracks - Time range for `top` mode - default: - - plugin_music_top_type: - description: Top tracks - Display type - default: - - plugin_music_user: - description: Music provider username - default: - # ==================================================================================== # đŸ—¨ī¸ StackOverflow plugin @@ -993,6 +961,49 @@ inputs: description: External source username default: + # ==================================================================================== + # đŸŽŧ Music plugin + + plugin_music: + description: Enable music plugin + default: + + plugin_music_provider: + description: Music provider + default: + + plugin_music_token: + description: Music provider token + default: + + plugin_music_mode: + description: Display mode + default: + + plugin_music_playlist: + description: Playlist URL + default: + + plugin_music_limit: + description: Display limit + default: + + plugin_music_played_at: + description: Recently played - Toggle last played timestamp display + default: + + plugin_music_time_range: + description: Top tracks - Time range for `top` mode + default: + + plugin_music_top_type: + description: Top tracks - Display type + default: + + plugin_music_user: + description: Music provider username + default: + # ==================================================================================== # đŸ—ŧ Rss feed diff --git a/settings.example.json b/settings.example.json index dc719729..c6bb0f2b 100644 --- a/settings.example.json +++ b/settings.example.json @@ -109,6 +109,9 @@ "starlists":{ "enabled": false, "//": "Enable starlists plugin" }, + "calendar":{ + "enabled": false, "//": "Enable calendar plugin" + }, "skyline":{ "enabled": false, "//": "Enable skyline plugin" }, @@ -116,10 +119,6 @@ "token": null, "//":"PageSpeed token\n\nAlthough not mandatory, it strongly advised to create one to avoid triggering the rate limiter. See [PageSpeed documentation](https://developers.google.com/speed/docs/insights/v5/get-started) for more informations.\n", "enabled": false, "//": "Enable pagespeed plugin" }, - "music":{ - "token": null, "//":"Music provider token\n\nBelow is the expected token format for each provider:\n- `apple`: *(not supported)*\n- `spotify`: \"client_id, client_secret, refresh_token\"\n- `lastfm`: \"api_key\"\n- `youtube`: \"cookie\"\n", - "enabled": false, "//": "Enable music plugin" - }, "stackoverflow":{ "enabled": false, "//": "Enable stackoverflow plugin" }, @@ -133,6 +132,10 @@ "posts":{ "enabled": false, "//": "Enable posts plugin" }, + "music":{ + "token": null, "//":"Music provider token\n\nBelow is the expected token format for each provider:\n- `apple`: *(not supported)*\n- `spotify`: \"client_id, client_secret, refresh_token\"\n- `lastfm`: \"api_key\"\n- `youtube`: \"cookie\"\n", + "enabled": false, "//": "Enable music plugin" + }, "rss":{ "enabled": false, "//": "Enable rss plugin" }, diff --git a/source/plugins/README.md b/source/plugins/README.md index 41920302..48f9b26d 100644 --- a/source/plugins/README.md +++ b/source/plugins/README.md @@ -10,6 +10,7 @@ Plugins provide additional content and lets you customize rendered metrics. * **Github plugins** * [🏆 Achievements `achievements`](/source/plugins/achievements/README.md) * [📰 Recent activity `activity`](/source/plugins/activity/README.md) + * [📆 Calendar `calendar`](/source/plugins/calendar/README.md) * [♐ Code snippet of the day `code`](/source/plugins/code/README.md) * [🏅 Repository contributors `contributors`](/source/plugins/contributors/README.md) * [đŸ’Ŧ Discussions `discussions`](/source/plugins/discussions/README.md) diff --git a/source/plugins/calendar/README.md b/source/plugins/calendar/README.md index 3eff2a87..365c3ff8 100644 --- a/source/plugins/calendar/README.md +++ b/source/plugins/calendar/README.md @@ -1,12 +1,83 @@ + + + + + + + + + + + + + + + + +

📆 Calendar

This plugin displays your commit calendar across several years

+
Supported features
→ Full specification
📗 Classic template
👤 Users
🔑 (scopeless) read:org (optional) read:user (optional) read:packages (optional) repo (optional)
+
Current year
+
Full history
+ +
## âžĄī¸ Available options + + + + + + + + + + + + + + + + + + +
TypeDescription

plugin_calendar

Enable calendar plugin

+
✨ On master/main
+type: boolean +
+default: no

plugin_calendar_limit

Years to display

+
✨ On master/main
+type: number +
+zero behaviour: disable
+default: 1
## â„šī¸ Examples workflows +```yaml +name: Current year calendar +uses: lowlighter/metrics@latest +with: + filename: metrics.plugin.calendar.svg + token: ${{ secrets.METRICS_TOKEN }} + base: "" + plugin_calendar: yes + +``` +```yaml +name: Full history calendar +uses: lowlighter/metrics@latest +with: + filename: metrics.plugin.calendar.full.svg + token: ${{ secrets.METRICS_TOKEN }} + base: "" + plugin_calendar: yes + plugin_calendar_limit: 0 + +``` diff --git a/source/plugins/calendar/metadata.yml b/source/plugins/calendar/metadata.yml index b35fc0c8..2be1ec29 100644 --- a/source/plugins/calendar/metadata.yml +++ b/source/plugins/calendar/metadata.yml @@ -4,6 +4,7 @@ description: This plugin displays your commit calendar across several years examples: +current year: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.calendar.svg full history: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.calendar.full.svg +index: 25 supports: - user scopes: diff --git a/source/plugins/music/metadata.yml b/source/plugins/music/metadata.yml index cb39a64d..fb19145c 100644 --- a/source/plugins/music/metadata.yml +++ b/source/plugins/music/metadata.yml @@ -7,7 +7,7 @@ description: | examples: +random tracks from a playlist: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.music.playlist.svg +recently listened: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.music.recent.svg -index: 2 +index: 6.5 supports: - user - organization diff --git a/source/plugins/rss/metadata.yml b/source/plugins/rss/metadata.yml index 76db0547..7561287e 100644 --- a/source/plugins/rss/metadata.yml +++ b/source/plugins/rss/metadata.yml @@ -3,7 +3,7 @@ category: social description: This plugin displays news from a given RSS feed. examples: default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.rss.svg -index: 6.5 +index: 7 supports: - user - organization diff --git a/source/plugins/skyline/metadata.yml b/source/plugins/skyline/metadata.yml index 0a019b6a..33c679f8 100644 --- a/source/plugins/skyline/metadata.yml +++ b/source/plugins/skyline/metadata.yml @@ -6,7 +6,7 @@ description: | > âš ī¸ This plugin significantly increase file size, consider using it as standalone. examples: default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.skyline.svg -index: 25 +index: 26 supports: - user scopes: [] diff --git a/source/plugins/sponsors/README.md b/source/plugins/sponsors/README.md index a56eb2c8..4bcdaf97 100644 --- a/source/plugins/sponsors/README.md +++ b/source/plugins/sponsors/README.md @@ -46,6 +46,7 @@
  • goal: display GitHub active goal
  • about: display GitHub sponsors introduction
  • +
  • list: display GitHub sponsors list
@@ -53,7 +54,7 @@ type: array (comma-separated)
-default: goal, about
+default: goal, list, about
allowed values:
  • goal
  • about
  • list
diff --git a/source/plugins/wakatime/metadata.yml b/source/plugins/wakatime/metadata.yml index f3aad9c4..de9121b2 100644 --- a/source/plugins/wakatime/metadata.yml +++ b/source/plugins/wakatime/metadata.yml @@ -3,7 +3,7 @@ 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: 8 supports: - user scopes: [] diff --git a/source/templates/classic/README.md b/source/templates/classic/README.md index adaa2bd4..db78e561 100644 --- a/source/templates/classic/README.md +++ b/source/templates/classic/README.md @@ -6,7 +6,7 @@ This is also the default template.

Supported features
→ Full specification - 🏆 📰 🌸 ♐ đŸĨ  💉 💩 📸 💹 đŸ’Ŧ đŸŽŸī¸ đŸŽĢ 💡 🙋 📅 đŸˆˇī¸ 👨‍đŸ’ģ đŸŽŧ 🎩 âąī¸ 🧑‍🤝‍🧑 âœ’ī¸ đŸ—‚ī¸ 🎭 📓 đŸ—ŧ 🌇 💕 đŸ—¨ī¸ ✨ đŸ’Ģ 🌟 💭 📌 🧮 🐤 ⏰ + 🏆 📰 🌸 📆 ♐ đŸĨ  💉 💩 📸 💹 đŸ’Ŧ đŸŽŸī¸ đŸŽĢ 💡 🙋 📅 đŸˆˇī¸ 👨‍đŸ’ģ đŸŽŧ 🎩 âąī¸ 🧑‍🤝‍🧑 âœ’ī¸ đŸ—‚ī¸ 🎭 📓 đŸ—ŧ 🌇 💕 đŸ—¨ī¸ ✨ đŸ’Ģ 🌟 💭 📌 🧮 🐤 ⏰ 👤 Users đŸ‘Ĩ Organizations diff --git a/tests/cases/calendar.plugin.yml b/tests/cases/calendar.plugin.yml new file mode 100644 index 00000000..7c16f990 --- /dev/null +++ b/tests/cases/calendar.plugin.yml @@ -0,0 +1,15 @@ +- name: 📆 Calendar - Current year calendar + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_calendar: 'yes' + use_mocked_data: 'yes' + verify: 'yes' +- name: 📆 Calendar - Full history calendar + uses: lowlighter/metrics@latest + with: + token: MOCKED_TOKEN + plugin_calendar: 'yes' + plugin_calendar_limit: 0 + use_mocked_data: 'yes' + verify: 'yes'