diff --git a/README.md b/README.md index 331f79a1..623f6575 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Generate metrics that can be embedded everywhere, including your GitHub profile -

🧩 Customizable with 40 plugins and 267 options!

+

🧩 Customizable with 40 plugins and 272 options!

@@ -111,6 +111,7 @@ Generate metrics that can be embedded everywhere, including your GitHub profile
Classic charts
Chartist charts
+
Worldmap
diff --git a/action.yml b/action.yml index 1f01349d..d4645093 100644 --- a/action.yml +++ b/action.yml @@ -405,6 +405,10 @@ inputs: description: Display limit (languages) default: + plugin_habits_languages_threshold: + description: Display threshold (percentage) + default: + # ==================================================================================== # 🏅 Repository contributors @@ -544,6 +548,18 @@ inputs: description: Charts display type default: + plugin_stargazers_worldmap: + description: Stargazers worldmap + default: + + plugin_stargazers_worldmap_token: + description: Stargazers worldmap token + default: + + plugin_stargazers_worldmap_sample: + description: Stargazers worldmap sample + default: + # ==================================================================================== # 🗂️ GitHub projects @@ -864,6 +880,10 @@ inputs: description: Compatibility mode default: + plugin_skyline_settings: + description: Advanced settings + default: + # ==================================================================================== # ⏱️ Google PageSpeed diff --git a/settings.example.json b/settings.example.json index 87d21e96..bf5d2c01 100644 --- a/settings.example.json +++ b/settings.example.json @@ -53,130 +53,131 @@ "plugins.default": false, "//": "Default plugin state (advised to let 'false' unless in debug mode)", "plugins": { "//": "Global plugin configuration", "isocalendar":{ - "enabled": false, "//": "Enable isocalendar plugin" + "enabled": false, "//": "Enable isocalendar plugin" }, "languages":{ - "enabled": false, "//": "Enable languages plugin" + "enabled": false, "//": "Enable languages plugin" }, "topics":{ - "enabled": false, "//": "Enable topics plugin" + "enabled": false, "//": "Enable topics plugin" }, "stars":{ - "enabled": false, "//": "Enable stars plugin" + "enabled": false, "//": "Enable stars plugin" }, "licenses":{ - "enabled": false, "//": "Enable licenses plugin" + "enabled": false, "//": "Enable licenses plugin" }, "habits":{ - "enabled": false, "//": "Enable habits plugin" + "enabled": false, "//": "Enable habits plugin" }, "contributors":{ - "enabled": false, "//": "Enable contributors plugin" + "enabled": false, "//": "Enable contributors plugin" }, "followup":{ - "enabled": false, "//": "Enable followup plugin" + "enabled": false, "//": "Enable followup plugin" }, "reactions":{ - "enabled": false, "//": "Enable reactions plugin" + "enabled": false, "//": "Enable reactions plugin" }, "people":{ - "enabled": false, "//": "Enable people plugin" + "enabled": false, "//": "Enable people plugin" }, "stargazers":{ - "enabled": false, "//": "Enable stargazers plugin" + "worldmap.token": null, "//": "Stargazers worldmap token", + "enabled": false, "//": "Enable stargazers plugin" }, "projects":{ - "enabled": false, "//": "Enable projects plugin" + "enabled": false, "//": "Enable projects plugin" }, "code":{ - "enabled": false, "//": "Enable code plugin" + "enabled": false, "//": "Enable code plugin" }, "activity":{ - "enabled": false, "//": "Enable activity plugin" + "enabled": false, "//": "Enable activity plugin" }, "achievements":{ - "enabled": false, "//": "Enable achievements plugin" + "enabled": false, "//": "Enable achievements plugin" }, "notable":{ - "enabled": false, "//": "Enable notable plugin" + "enabled": false, "//": "Enable notable plugin" }, "discussions":{ - "enabled": false, "//": "Enable discussions plugin" + "enabled": false, "//": "Enable discussions plugin" }, "support":{ - "enabled": false, "//": "Enable support plugin" + "enabled": false, "//": "Enable support plugin" }, "lines":{ - "enabled": false, "//": "Enable lines plugin" + "enabled": false, "//": "Enable lines plugin" }, "traffic":{ - "enabled": false, "//": "Enable traffic plugin" + "enabled": false, "//": "Enable traffic plugin" }, "repositories":{ - "enabled": false, "//": "Enable repositories plugin" + "enabled": false, "//": "Enable repositories plugin" }, "gists":{ - "enabled": false, "//": "Enable gists plugin" + "enabled": false, "//": "Enable gists plugin" }, "introduction":{ - "enabled": false, "//": "Enable introduction plugin" + "enabled": false, "//": "Enable introduction plugin" }, "sponsors":{ - "enabled": false, "//": "Enable sponsors plugin" + "enabled": false, "//": "Enable sponsors plugin" }, "starlists":{ - "enabled": false, "//": "Enable starlists plugin" + "enabled": false, "//": "Enable starlists plugin" }, "calendar":{ - "enabled": false, "//": "Enable calendar plugin" + "enabled": false, "//": "Enable calendar plugin" }, "skyline":{ - "enabled": false, "//": "Enable skyline plugin" + "enabled": false, "//": "Enable skyline plugin" }, "pagespeed":{ - "token": null, "//": "PageSpeed token", - "enabled": false, "//": "Enable pagespeed plugin" + "token": "PageSpeed token", + "enabled": false, "//": "Enable pagespeed plugin" }, "stackoverflow":{ - "enabled": false, "//": "Enable stackoverflow plugin" + "enabled": false, "//": "Enable stackoverflow plugin" }, "anilist":{ - "enabled": false, "//": "Enable aniList plugin" + "enabled": false, "//": "Enable aniList plugin" }, "tweets":{ - "token": null, "//": "Twitter API token", - "enabled": false, "//": "Enable tweets plugin" + "token": "Twitter API token", + "enabled": false, "//": "Enable tweets plugin" }, "posts":{ - "enabled": false, "//": "Enable posts plugin" + "enabled": false, "//": "Enable posts plugin" }, "music":{ - "token": null, "//": "Music provider token", - "enabled": false, "//": "Enable music plugin" + "token": "Music provider token", + "enabled": false, "//": "Enable music plugin" }, "rss":{ - "enabled": false, "//": "Enable rss plugin" + "enabled": false, "//": "Enable rss plugin" }, "wakatime":{ - "token": null, "//": "WakaTime API token", - "enabled": false, "//": "Enable wakatime plugin" + "token": "WakaTime API token", + "enabled": false, "//": "Enable wakatime plugin" }, "fortune":{ - "enabled": false, "//": "Enable fortune plugin" + "enabled": false, "//": "Enable fortune plugin" }, "nightscout":{ - "enabled": false, "//": "Enable nightscout plugin" + "enabled": false, "//": "Enable nightscout plugin" }, "poopmap":{ - "token": null, "//": "PoopMap API token", - "enabled": false, "//": "Enable poopmap plugin" + "token": "PoopMap API token", + "enabled": false, "//": "Enable poopmap plugin" }, "screenshot":{ - "enabled": false, "//": "Enable screenshot plugin" + "enabled": false, "//": "Enable screenshot plugin" }, "stock":{ - "token": null, "//": "Yahoo Finance token", - "enabled": false, "//": "Enable stock plugin" + "token": "Yahoo Finance token", + "enabled": false, "//": "Enable stock plugin" }, "//": "" } diff --git a/source/plugins/habits/README.md b/source/plugins/habits/README.md index 462f767c..2271e583 100644 --- a/source/plugins/habits/README.md +++ b/source/plugins/habits/README.md @@ -140,6 +140,17 @@ Recent language activity may also displayed (it requires extras features to be e zero behaviour: disable
default: 8
+ +

plugin_habits_languages_threshold

+

Display threshold (percentage)

+ + + + ✨ On master/main
+type: string +
+default: 0%
+ diff --git a/source/plugins/skyline/README.md b/source/plugins/skyline/README.md index 972779b4..5e7a4d9e 100644 --- a/source/plugins/skyline/README.md +++ b/source/plugins/skyline/README.md @@ -102,6 +102,35 @@ Using this mode significantly increase file size as each frame is encoded separa
default: no
+ +

plugin_skyline_settings

+

Advanced settings

+

Can be configured to use alternate skyline websites different from skyline.github.com, such as honzaap's GitHub City.

+
    +
  • url: Target URL (mandatory)
  • +
  • ready: Readiness condition (A JS function that returns a boolean)
  • +
  • wait: Time to wait after readiness condition is met (in seconds)
  • +
  • hide: HTML elements to hide (A CSS selector)
  • +
+

For url and ready options, ${login} and ${year} will be respectively templated to user's login and specified year

+ + + + ✨ On master/main
+🌐 Web instances must configure settings.json: +
    +
  • metrics.run.puppeteer.user.js
  • +
+type: json +
+default: { + "url": "https://skyline.github.com/${login}/${year}", + "ready": "[...document.querySelectorAll('span')].map(span => span.innerText).includes('Share on Twitter')", + "wait": 1, + "hide": "button, footer, a" +} +
+ @@ -120,5 +149,25 @@ with: plugin_skyline_frames: 6 plugin_skyline_quality: 1 +``` +```yaml +name: GitHub City +uses: lowlighter/metrics@latest +with: + filename: metrics.plugin.skyline.city.svg + token: NOT_NEEDED + base: "" + plugin_skyline: yes + plugin_skyline_year: 2020 + plugin_skyline_frames: 6 + plugin_skyline_quality: 1 + plugin_skyline_settings: | + { + "url": "https://honzaap.github.io/GithubCity?name=${login}&year=${year}", + "ready": "[...document.querySelectorAll('.display-info span')].map(span => span.innerText).includes('${login}')", + "wait": 4, + "hide": ".github-corner, .footer-link, .buttons-options, .mobile-rotate, .display-info span:first-child" + } + ``` diff --git a/source/plugins/stargazers/README.md b/source/plugins/stargazers/README.md index 07602d30..a590a9f1 100644 --- a/source/plugins/stargazers/README.md +++ b/source/plugins/stargazers/README.md @@ -12,12 +12,13 @@ 👤 Users 👥 Organizations 📓 Repositories - 🔑 (scopeless) read:org (optional) read:user (optional) read:packages (optional) repo (optional) + 🔑 (scopeless) 🗝️ plugin_stargazers_worldmap_token read:org (optional) read:user (optional) read:packages (optional) repo (optional)
Classic charts
Chartist charts
+
Worldmap
@@ -71,6 +72,48 @@ Follow instructions from their [documentation](https://developers.google.com/map default: classic
allowed values:
  • classic
  • chartist
+ +

plugin_stargazers_worldmap

+

Stargazers worldmap

+ + + + ✨ On master/main
+🌐 Web instances must configure settings.json: +
    +
  • metrics.api.google.maps
  • +
+type: boolean +
+default: no
+ + +

plugin_stargazers_worldmap_token

+

Stargazers worldmap token

+ + + + 🔐 Token
+✨ On master/main
+type: token +
+ + +

plugin_stargazers_worldmap_sample

+

Stargazers worldmap sample

+

Use this setting to randomly sample and limit your stargazers. +Helps to avoid consuming too much Google Geocoding API requests while still being representative.

+ + + + ✨ On master/main
+type: number +(0 ≤ +𝑥) +
+zero behaviour: disable
+default: 0
+ @@ -97,5 +140,18 @@ with: plugin_stargazers: yes plugin_stargazers_charts_type: chartist +``` +```yaml +name: With worldmap +uses: lowlighter/metrics@latest +with: + filename: metrics.plugin.stargazers.worldmap.svg + token: ${{ secrets.METRICS_TOKEN }} + base: "" + plugin_stargazers: yes + plugin_stargazers_worldmap: yes + plugin_stargazers_worldmap_token: ${{ secrets.GOOGLE_MAP_TOKEN }} + plugin_stargazers_worldmap_sample: 200 + ```