From 52ca4d04b73a8eca51090857050e284ef25626a6 Mon Sep 17 00:00:00 2001
From: lowlighter <22963968+lowlighter@users.noreply.github.com>
Date: Mon, 4 Jul 2022 23:18:01 -0400
Subject: [PATCH] docs(plugins): clarification, fix typos and style
---
.../partials/documentation/setup/web.md | 4 +-
.../scripts/quickstart/plugin/metadata.yml | 8 +-
.../scripts/quickstart/template/metadata.yml | 5 +-
source/app/metrics/metadata.mjs | 38 ++++++++
source/plugins/achievements/metadata.yml | 28 +++---
source/plugins/activity/metadata.yml | 27 +++---
source/plugins/anilist/metadata.yml | 38 +++++---
source/plugins/base/metadata.yml | 40 +++++----
source/plugins/calendar/metadata.yml | 8 +-
source/plugins/code/metadata.yml | 26 ++++--
source/plugins/community/README.md | 26 ++++--
source/plugins/community/fortune/metadata.yml | 8 +-
.../plugins/community/nightscout/metadata.yml | 26 ++++--
source/plugins/community/poopmap/metadata.yml | 14 +--
.../plugins/community/screenshot/metadata.yml | 22 +++--
source/plugins/community/stock/metadata.yml | 22 +++--
source/plugins/contributors/metadata.yml | 34 ++++---
source/plugins/core/metadata.yml | 55 +++++++-----
source/plugins/discussions/metadata.yml | 13 +--
source/plugins/followup/metadata.yml | 18 ++--
source/plugins/gists/metadata.yml | 8 +-
source/plugins/habits/metadata.yml | 29 ++++--
source/plugins/introduction/metadata.yml | 10 +--
source/plugins/isocalendar/metadata.yml | 9 +-
source/plugins/languages/metadata.yml | 89 +++++++++++++------
source/plugins/licenses/metadata.yml | 23 +++--
source/plugins/lines/metadata.yml | 11 ++-
source/plugins/music/metadata.yml | 36 +++++---
source/plugins/notable/metadata.yml | 26 +++---
source/plugins/pagespeed/metadata.yml | 32 ++++---
source/plugins/people/metadata.yml | 43 +++++----
source/plugins/posts/metadata.yml | 31 ++++---
source/plugins/projects/metadata.yml | 17 ++--
source/plugins/reactions/metadata.yml | 29 +++---
source/plugins/repositories/metadata.yml | 17 ++--
source/plugins/rss/metadata.yml | 14 +--
source/plugins/skyline/metadata.yml | 14 +--
source/plugins/sponsors/metadata.yml | 18 ++--
source/plugins/stackoverflow/metadata.yml | 22 +++--
source/plugins/stargazers/metadata.yml | 13 ++-
source/plugins/starlists/metadata.yml | 34 ++++---
source/plugins/stars/metadata.yml | 11 ++-
source/plugins/support/metadata.yml | 8 +-
source/plugins/topics/metadata.yml | 20 +++--
source/plugins/traffic/metadata.yml | 11 ++-
source/plugins/tweets/metadata.yml | 31 ++++---
source/plugins/wakatime/metadata.yml | 75 +++++++++-------
47 files changed, 733 insertions(+), 408 deletions(-)
diff --git a/.github/readme/partials/documentation/setup/web.md b/.github/readme/partials/documentation/setup/web.md
index 5c538ffb..34c99451 100644
--- a/.github/readme/partials/documentation/setup/web.md
+++ b/.github/readme/partials/documentation/setup/web.md
@@ -84,7 +84,9 @@ Configuration file also contains settings about enabled templates, plugins and f
}
```
-> ⚠️ Extras features **should not** be enabled on a public server, most of these are compute-intensive and some of some even allow remote code execution! Use with caution
+> ⚠️ Extras features **should not** be enabled on a public server, most of these are either compute, network or API intensive tasks. Some extras features even allow remote code execution which could compromise server security.
+>
+> Use at your own risk, *metrics* and its authors cannot be held responsible for any damage caused.
## 3️ Start docker container
diff --git a/.github/scripts/quickstart/plugin/metadata.yml b/.github/scripts/quickstart/plugin/metadata.yml
index ecf63742..de0f6d77 100644
--- a/.github/scripts/quickstart/plugin/metadata.yml
+++ b/.github/scripts/quickstart/plugin/metadata.yml
@@ -1,6 +1,7 @@
-name: "🧩 <%= `${name.charAt(0).toLocaleUpperCase()}${name.substring(1)}` %>"
+name: 🧩 <%= `${name.charAt(0).toLocaleUpperCase()}${name.substring(1)}` %>
category: community
-description: Short description
+description: |
+ Short description
examples:
default: https://via.placeholder.com/468x60?text=No%20preview%20available
authors:
@@ -13,6 +14,7 @@ scopes: []
inputs:
plugin_<%= name %>:
- description: Enable <%= name %> plugin
+ description: |
+ Enable <%= name %> plugin
type: boolean
default: no
diff --git a/.github/scripts/quickstart/template/metadata.yml b/.github/scripts/quickstart/template/metadata.yml
index ea172f4a..f775bfe9 100644
--- a/.github/scripts/quickstart/template/metadata.yml
+++ b/.github/scripts/quickstart/template/metadata.yml
@@ -1,6 +1,7 @@
-name: "🖼️ Template name"
+name: 🖼️ Template name
extends: classic
-description: Short description
+description: |
+ Short description
examples:
default: https://via.placeholder.com/468x60?text=No%20preview%20available
authors:
diff --git a/source/app/metrics/metadata.mjs b/source/app/metrics/metadata.mjs
index 7c9f58a1..3faaff77 100644
--- a/source/app/metrics/metadata.mjs
+++ b/source/app/metrics/metadata.mjs
@@ -212,6 +212,38 @@ metadata.plugin = async function({__plugins, __templates, name, logger}) {
Object.assign(meta.inputs, inputs, Object.fromEntries(Object.entries(inputs).map(([key, value]) => [metadata.to.query(key, {name}), value])))
}
+ //Extra features parser
+ {
+ meta.extras = function(input, {extras = {}}) {
+ //Required permissions
+ const required = inputs[metadata.to.yaml(input, {name})]?.extras ?? null
+ if (!required)
+ return true
+ console.debug(`metrics/extras > ${name} > ${input} > require [${required}]`)
+
+ //Legacy handling
+ const enabled = extras?.features ?? extras?.default ?? false
+ if (typeof enabled === "boolean") {
+ console.debug(`metrics/extras > ${name} > ${input} > extras features is set to ${enabled}`)
+ return enabled
+ }
+ if (!Array.isArray(required)) {
+ console.debug(`metrics/extras > ${name} > ${input} > extras is not a permission array, skipping`)
+ return false
+ }
+
+ //Check permissions
+ if (!Array.isArray(extras.features))
+ throw new Error(`metrics/extras > ${name} > ${input} > extras.features is not an array`)
+ const missing = required.filter(permission => !extras.features.includes(permission))
+ if (missing.length > 0) {
+ console.debug(`metrics/extras > ${name} > ${input} > missing permissions [${missing}], skipping`)
+ return false
+ }
+ return true
+ }
+ }
+
//Action metadata
{
//Extract comments
@@ -538,6 +570,12 @@ metadata.to = {
key = key.replace(/^plugin_/, "").replace(/_/g, ".")
return name ? key.replace(new RegExp(`^(${name}.)`, "g"), "") : key
},
+ yaml(key, {name = ""} = {}) {
+ const parts = [key.replaceAll(".", "_")]
+ if (name)
+ parts.unshift((name === "base") ? name : `plugin_${name}`)
+ return parts.join("_")
+ }
}
//Demo for main and individual readmes
diff --git a/source/plugins/achievements/metadata.yml b/source/plugins/achievements/metadata.yml
index 0fba52b6..ffb0e0b8 100644
--- a/source/plugins/achievements/metadata.yml
+++ b/source/plugins/achievements/metadata.yml
@@ -1,6 +1,7 @@
-name: "🏆 Achievements"
+name: 🏆 Achievements
category: github
-description: This plugin displays several highlights about what you achieved on GitHub.
+description: |
+ This plugin displays several highlights about what an account has achieved on GitHub.
examples:
+compact display: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.achievements.compact.svg
detailed display: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.achievements.svg
@@ -13,13 +14,14 @@ scopes:
inputs:
plugin_achievements:
- description: Enable achievements plugin
+ description: |
+ Enable achievements plugin
type: boolean
default: no
plugin_achievements_threshold:
description: |
- Display rank threshold
+ Rank threshold filter
Use `X` to display achievements not yet unlocked
type: string
@@ -32,13 +34,15 @@ inputs:
- X
plugin_achievements_secrets:
- description: Display secrets achievements
+ description: |
+ Secrets achievements
type: boolean
default: yes
plugin_achievements_display:
description: |
Display style
+
- `detailed`: display icon, name, description and ranking
- `compact`: display icon, name and value
type: string
@@ -48,16 +52,18 @@ inputs:
- compact
plugin_achievements_limit:
- description: Display limit
+ description: |
+ Display limit
type: number
default: 0
min: 0
+ zero: disable
plugin_achievements_ignored:
description: |
- Hide specified achievements
+ Ignored achievements
- Use names without the rank adjective (i.e. without "great", "super" or "master")
+ Use achievements names without their rank adjective (i.e. without "great", "super" or "master")
type: array
format: comma-separated
default: ""
@@ -65,11 +71,11 @@ inputs:
plugin_achievements_only:
description: |
- Restrict display to specified achievements
+ Showcased achievements
- Use names without the rank adjective (i.e. without "great", "super" or "master")
+ Use achievements names without their rank adjective (i.e. without "great", "super" or "master")
- This option is equivalent to `plugin_achievements_ignored` with all existing achievements but the ones listed in this option
+ This option is equivalent to [`plugin_achievements_ignored`](/source/plugins/achievements/README.md#plugin_achievements_ignored) with all existing achievements except the ones listed in this option
type: array
format: comma-separated
default: ""
diff --git a/source/plugins/activity/metadata.yml b/source/plugins/activity/metadata.yml
index 26ff14e5..5d8d8add 100644
--- a/source/plugins/activity/metadata.yml
+++ b/source/plugins/activity/metadata.yml
@@ -1,6 +1,7 @@
-name: "📰 Recent activity"
+name: 📰 Recent activity
category: github
-description: This plugin displays your recent activity on GitHub.
+description: |
+ This plugin displays recent activity on GitHub.
examples:
default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.activity.svg
index: 13
@@ -13,26 +14,30 @@ scopes:
inputs:
plugin_activity:
- description: Enable activity plugin
+ description: |
+ Enable activity plugin
type: boolean
default: no
plugin_activity_limit:
- description: Display limit
+ description: |
+ Display limit
type: number
default: 5
min: 1
max: 1000
plugin_activity_load:
- description: Events to load
+ description: |
+ Events to load
type: number
default: 300
min: 100
max: 1000
plugin_activity_days:
- description: Events maximum age
+ description: |
+ Events maximum age
type: number
default: 14
min: 0
@@ -43,7 +48,7 @@ inputs:
description: |
Events visibility
- Lets you hide private activity when using a `repo` scope token
+ Can be used to toggle private activity visibility when using a token with `repo` scope
type: string
default: all
values:
@@ -51,12 +56,14 @@ inputs:
- all
plugin_activity_timestamps:
- description: Display events timestamps
+ description: |
+ Events timestamps
type: boolean
default: no
plugin_activity_skipped:
- description: Skipped repositories
+ description: |
+ Skipped repositories
type: array
format: comma-separated
default: ""
@@ -67,7 +74,7 @@ inputs:
description: |
Ignored users
- Useful to ignore bots activity
+ Can be used to ignore bots activity
type: array
format: comma-separated
default: ""
diff --git a/source/plugins/anilist/metadata.yml b/source/plugins/anilist/metadata.yml
index a5aa1b1c..aa74e4e1 100644
--- a/source/plugins/anilist/metadata.yml
+++ b/source/plugins/anilist/metadata.yml
@@ -1,6 +1,7 @@
-name: "🌸 Anilist watch list and reading list"
+name: 🌸 Anilist watch list and reading list
category: social
-description: This plugin displays your favorites animes, mangas and characters from your [AniList](https://anilist.co) account.
+description: |
+ This plugin displays favorites animes, mangas and characters from a [AniList](https://anilist.co) account.
examples:
+for anime watchers: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.anilist.svg
for manga readers: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.anilist.manga.svg
@@ -13,12 +14,21 @@ scopes: []
inputs:
plugin_anilist:
- description: Enable aniList plugin
+ description: |
+ Enable aniList plugin
type: boolean
default: no
+ plugin_anilist_user:
+ type: string
+ description: |
+ AniList login
+ default: .user.login
+ preset: no
+
plugin_anilist_medias:
- description: Display medias types
+ description: |
+ Medias types
type: array
format: comma-separated
default: anime, manga
@@ -29,7 +39,8 @@ inputs:
plugin_anilist_sections:
description: |
Displayed sections
- - `favorites` will display favorites `plugin_anilist_medias`
+
+ - `favorites` will display favorites from `plugin_anilist_medias`
- `watching` will display animes currently in watching list
- `reading` will display manga currently in reading list
- `characters` will display liked characters
@@ -44,26 +55,25 @@ inputs:
- characters
plugin_anilist_limit:
- description: Display limit (medias)
+ description: |
+ Display limit (medias)
type: number
default: 2
min: 0
zero: disable
plugin_anilist_limit_characters:
- description: Display limit (characters)
+ description: |
+ Display limit (characters)
type: number
default: 22
min: 0
zero: disable
plugin_anilist_shuffle:
- description: Shuffle data for varied outputs
+ description: |
+ Shuffle data
+
+ Can be used to create varied outputs
type: boolean
default: yes
-
- plugin_anilist_user:
- type: string
- description: AniList login
- default: .user.login
- preset: no
diff --git a/source/plugins/base/metadata.yml b/source/plugins/base/metadata.yml
index 8b66d60f..a372d0e4 100644
--- a/source/plugins/base/metadata.yml
+++ b/source/plugins/base/metadata.yml
@@ -1,4 +1,4 @@
-name: "🗃️ Base content"
+name: 🗃️ Base content
category: core
description:
examples:
@@ -12,17 +12,16 @@ scopes:
- public_access
inputs:
- # Base content
base:
description: |
Base content
The following sections are supported:
- * `header`, which usually contains username, two-week commits calendars and a few additional data
- * `activity`, which contains recent activity (commits, pull requests, issues, etc.)
- * `community`, which contains community stats (following, sponsors, organizations, etc.)
- * `repositories`, which contains repository stats (license, forks, stars, etc.)
- * `metadata`, which contains information about generated metrics
+ - `header`, which usually contains username, two-weeks commits calendars and a few additional data
+ - `activity`, which contains recent activity (commits, pull requests, issues, etc.)
+ - `community`, which contains community stats (following, sponsors, organizations, etc.)
+ - `repositories`, which contains repository stats (license, forks, stars, etc.)
+ - `metadata`, which contains information about generated metrics
These are all enabled by default, but it is possible to explicitly opt out from them.
type: array
@@ -36,7 +35,6 @@ inputs:
- metadata
base_indepth:
- extras: yes
description: |
Indepth mode
@@ -49,16 +47,19 @@ inputs:
- total repositories contributed to
type: boolean
default: no
+ extras:
+ - metrics.api.github.overuse
+ - plugins.base.indepth
base_hireable:
description: |
- Display `Available for hire!` in header section
+ Show `Available for hire!` in header section
type: boolean
default: no
repositories:
description: |
- Repositories to fetch
+ Fetched repositories
A higher value result in more accurate metrics but can hit GitHub API rate-limit more easily (especially with a lot of plugins enabled)
type: number
@@ -67,31 +68,33 @@ inputs:
repositories_batch:
description: |
- Repositories to fetch at a time
+ Fetched repositories per query
- If you receive `Something went wrong while executing your query` (which is usually caused by API timeout),
- try lowering this value.
+ If you receive `Something went wrong while executing your query` (which is usually caused by API timeouts), lowering this value may help.
+ This setting may not be supported by all plugins.
type: number
default: 100
max: 100
min: 1
repositories_forks:
- description: Include forks
+ description: |
+ Include forks
type: boolean
default: no
repositories_affiliations:
description: |
Repositories affiliations
+
- `owner`: owned repositories
- `collaborator`: repositories with push access
- `organization_member`: repositories from an organization where user is a member
Some plugin outputs may be affected by this setting too.
- Set to `""` to disable and fetch all repositories related to you.
- Broad affiliation will result in less representative metrics.
+ Set to `""` to disable and fetch all repositories related to given account.
+ Broad affiliations will result in less representative metrics.
type: array
format: comma-separated
default: owner
@@ -101,7 +104,8 @@ inputs:
- organization_member
repositories_skipped:
- description: Default skipped repositories
+ description: |
+ Default skipped repositories
type: array
format: comma-separated
default: ""
@@ -112,7 +116,7 @@ inputs:
description: |
Default ignored users
- Note that email are supported only commits-related elements.
+ Note that emails are only supported in commits-related elements.
type: array
format: comma-separated
default: github-actions[bot], dependabot[bot], dependabot-preview[bot], actions-user, action@github.com
diff --git a/source/plugins/calendar/metadata.yml b/source/plugins/calendar/metadata.yml
index a2c50c16..29946f79 100644
--- a/source/plugins/calendar/metadata.yml
+++ b/source/plugins/calendar/metadata.yml
@@ -1,6 +1,7 @@
-name: "📆 Calendar"
+name: 📆 Commit calendar
category: github
-description: This plugin displays your commit calendar across several years
+description: |
+ This plugin can display 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
@@ -12,7 +13,8 @@ scopes:
inputs:
plugin_calendar:
- description: Enable calendar plugin
+ description: |
+ Enable calendar plugin
type: boolean
default: no
diff --git a/source/plugins/code/metadata.yml b/source/plugins/code/metadata.yml
index 7fefa45f..c4783b11 100644
--- a/source/plugins/code/metadata.yml
+++ b/source/plugins/code/metadata.yml
@@ -1,7 +1,7 @@
-name: "♐ Code snippet of the day"
+name: ♐ Random code snippet
category: github
description: |
- This plugin displays a random code snippet from your recent activity history.
+ This plugin displays a random code snippet from recent activity history.
> ⚠️ When improperly configured, this plugin could display private code.
> If you work with sensitive data or company code, it is advised to keep this plugin disabled.
@@ -17,24 +17,30 @@ scopes:
inputs:
plugin_code:
- description: Enable code plugin
+ description: |
+ Enable code plugin
type: boolean
default: no
plugin_code_lines:
- description: Display limit for code snippets
+ description: |
+ Display limit (lines per code snippets)
type: number
default: 12
+ min: 1
+ max: 128
plugin_code_load:
- description: Events to load
+ description: |
+ Events to load
type: number
default: 400
min: 100
max: 1000
plugin_code_days:
- description: Events maximum age
+ description: |
+ Events maximum age
type: number
default: 3
min: 0
@@ -45,7 +51,7 @@ inputs:
description: |
Events visibility
- Lets you hide private activity when using a `repo` scope token
+ Can be used to toggle private activity visibility when using a token with `repo` scope
type: string
default: public
values:
@@ -53,7 +59,8 @@ inputs:
- all
plugin_code_skipped:
- description: Skipped repositories
+ description: |
+ Skipped repositories
type: array
format: comma-separated
default: ""
@@ -61,7 +68,8 @@ inputs:
inherits: repositories_skipped
plugin_code_languages:
- description: Restrict display to specific languages
+ description: |
+ Showcased languages
type: array
format: comma-separated
default: ""
diff --git a/source/plugins/community/README.md b/source/plugins/community/README.md
index 9e9fae5b..145984a1 100644
--- a/source/plugins/community/README.md
+++ b/source/plugins/community/README.md
@@ -99,9 +99,10 @@ Plugins are auto-loaded based on their folder existence, so there's no need to r
The default file looks like below:
```yaml
-name: "🧩 Plugin name"
+name: 🧩 Plugin name
category: community
-description: Short description
+description: |
+ Short description
examples:
default: https://via.placeholder.com/468x60?text=No%20preview%20available
authors:
@@ -114,7 +115,8 @@ scopes: []
inputs:
plugin_{name}:
- description: Enable {name} plugin
+ description: |
+ Enable {name} plugin
type: boolean
default: no
```
@@ -134,14 +136,16 @@ Because of GitHub Actions original limitations, only strings, numbers and boolea
*Example: boolean type, defaults to `false`*
```yml
plugin_{name}_{option}:
- description: Boolean type
+ description: |
+ Boolean type
type: boolean
default: no
```
```yml
plugin_{name}_{option}:
- description: String type
+ description: |
+ String type
type: string
default: .user.login
```
@@ -151,7 +155,8 @@ Because of GitHub Actions original limitations, only strings, numbers and boolea
*Example: string type, defaults to `foo` with `foo` or `bar` as allowed values*
```yml
plugin_{name}_{option}:
- description: Select type
+ description: |
+ Select type
type: string
values:
- foo
@@ -164,7 +169,8 @@ Because of GitHub Actions original limitations, only strings, numbers and boolea
*Example: number type, defaults to `1` and expected to be between `0` and `100`*
```yml
plugin_{name}_{option}:
- description: Number type
+ description: |
+ Number type
type: number
default: 1
min: 0
@@ -178,7 +184,8 @@ Because of GitHub Actions original limitations, only strings, numbers and boolea
*Example: array type, with comma-separated elements*
```yml
plugin_{name}_{option}:
- description: Array type
+ description: |
+ Array type
type: array
format: comma-separated
values:
@@ -192,7 +199,8 @@ Because of GitHub Actions original limitations, only strings, numbers and boolea
*Example: json type*
```yml
plugin_{name}_{option}:
- description: JSON type
+ description: |
+ JSON type
type: json
default: |
{
diff --git a/source/plugins/community/fortune/metadata.yml b/source/plugins/community/fortune/metadata.yml
index 0e365b72..b5c96959 100644
--- a/source/plugins/community/fortune/metadata.yml
+++ b/source/plugins/community/fortune/metadata.yml
@@ -1,6 +1,7 @@
-name: "🥠 Fortune"
+name: 🥠 Fortune
category: community
-description: This plugins displays a random fortune message
+description: |
+ This plugins displays a random fortune message
examples:
default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.fortune.svg
authors:
@@ -11,6 +12,7 @@ scopes: []
inputs:
plugin_fortune:
- description: Enable fortune plugin
+ description: |
+ Enable fortune plugin
type: boolean
default: no
diff --git a/source/plugins/community/nightscout/metadata.yml b/source/plugins/community/nightscout/metadata.yml
index 91018ffd..0130d470 100644
--- a/source/plugins/community/nightscout/metadata.yml
+++ b/source/plugins/community/nightscout/metadata.yml
@@ -1,6 +1,7 @@
-name: "💉 Nightscout"
+name: 💉 Nightscout
category: community
-description: This plugin lets you display blood sugar values from a [Nightscout](http://nightscout.info) site.
+description: |
+ This plugin displays blood sugar values from a [Nightscout](http://nightscout.info) site.
examples:
default: https://github.com/legoandmars/legoandmars/blob/master/metrics.plugin.nightscout.svg
authors:
@@ -11,42 +12,49 @@ scopes: []
inputs:
plugin_nightscout:
- description: Enable nightscout plugin
+ description: |
+ Enable nightscout plugin
type: boolean
default: no
plugin_nightscout_url:
- description: Nightscout URL
+ description: |
+ Nightscout URL
type: string
default: https://example.herokuapp.com
plugin_nightscout_datapoints:
- description: Number of datapoints shown the graph
+ description: |
+ Number of datapoints shown the graph
type: number
default: 12
min: 0
zero: disable
plugin_nightscout_lowalert:
- description: Threshold for low blood sugar
+ description: |
+ Threshold for low blood sugar
type: number
default: 80
min: 0
plugin_nightscout_highalert:
- description: Threshold for high blood sugar
+ description: |
+ Threshold for high blood sugar
type: number
default: 180
min: 0
plugin_nightscout_urgentlowalert:
- description: Threshold for urgently low blood sugar
+ description: |
+ Threshold for urgently low blood sugar
type: number
default: 50
min: 0
plugin_nightscout_urgenthighalert:
- description: Threshold for urgently high blood sugar
+ description: |
+ Threshold for urgently high blood sugar
type: number
default: 250
min: 0
diff --git a/source/plugins/community/poopmap/metadata.yml b/source/plugins/community/poopmap/metadata.yml
index 9df3e8ed..5e3aa018 100644
--- a/source/plugins/community/poopmap/metadata.yml
+++ b/source/plugins/community/poopmap/metadata.yml
@@ -1,6 +1,7 @@
-name: "💩 PoopMap plugin"
+name: 💩 PoopMap plugin
category: community
-description: This plugin displays statistics from a [PoopMap](https://poopmap.net) account.
+description: |
+ This plugin displays statistics from a [PoopMap](https://poopmap.net) account.
examples:
default: https://github.com/matievisthekat/matievisthekat/blob/master/metrics.plugin.poopmap.svg
authors:
@@ -11,17 +12,20 @@ scopes: []
inputs:
plugin_poopmap:
- description: Enable poopmap plugin
+ description: |
+ Enable poopmap plugin
type: boolean
default: no
plugin_poopmap_token:
- description: PoopMap API token
+ description: |
+ PoopMap API token
type: token
default: ""
plugin_poopmap_days:
- description: Time range
+ description: |
+ Time range
type: number
values:
- 7
diff --git a/source/plugins/community/screenshot/metadata.yml b/source/plugins/community/screenshot/metadata.yml
index 907aa565..26d776b5 100644
--- a/source/plugins/community/screenshot/metadata.yml
+++ b/source/plugins/community/screenshot/metadata.yml
@@ -1,8 +1,9 @@
-name: "📸 Website screenshot"
+name: 📸 Website screenshot
category: community
description: |
- This plugin display a screenshot from any website.
- It can either the full page or a portion restricted by a [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors).
+ This plugin displays a screenshot from any website.
+
+ It can either show the full page or a portion restricted by a [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors).
examples:
default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.screenshot.svg
authors:
@@ -15,27 +16,32 @@ scopes: []
inputs:
plugin_screenshot:
- description: Enable screenshot plugin
+ description: |
+ Enable screenshot plugin
type: boolean
default: no
plugin_screenshot_title:
- description: Title caption
+ description: |
+ Title caption
type: string
default: Screenshot
plugin_screenshot_url:
- description: Website url
+ description: |
+ Website URL
type: string
default: ""
example: https://metrics.lecoq.io
plugin_screenshot_selector:
- description: CSS Selector
+ description: |
+ CSS Selector
type: string
default: body
plugin_screenshot_background:
- description: Display background
+ description: |
+ Background
type: boolean
default: yes
\ No newline at end of file
diff --git a/source/plugins/community/stock/metadata.yml b/source/plugins/community/stock/metadata.yml
index 6ba9443e..0831e225 100644
--- a/source/plugins/community/stock/metadata.yml
+++ b/source/plugins/community/stock/metadata.yml
@@ -1,6 +1,7 @@
-name: "💹 Stock prices"
+name:"💹 Stock prices
category: community
-description: This plugin displays the stock market price of a given company.
+description: |
+ This plugin displays the stock market price of a given company.
examples:
default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.stock.svg
authors:
@@ -13,24 +14,30 @@ scopes: []
inputs:
plugin_stock:
- description: Enable stock plugin
+ description: |
+ Enable stock plugin
type: boolean
default: no
+ extras:
+ - metrics.npm.optional.chartist
plugin_stock_token:
- description: Yahoo Finance token
+ description: |
+ Yahoo Finance token
type: token
default: ""
plugin_stock_symbol:
- description: Company stock symbol
+ description: |
+ Company stock symbol
type: string
default: ""
example: MSFT
plugin_stock_duration:
description: |
- Time range (relative to current date)
+ Time range
+
- `1d`: Today
- `5d`: 5 days
- `1mo`: 1 month
@@ -42,6 +49,8 @@ inputs:
- `10y`: 10 years
- `ytd`: Year to date
- `max`: All time
+
+ This is relative to current date
type: string
default: 1d
values:
@@ -60,6 +69,7 @@ inputs:
plugin_stock_interval:
description: |
Time interval between points
+
- `1m`: 1 minute
- `2m`: 2 minutes
- `5m`: 5 minutes
diff --git a/source/plugins/contributors/metadata.yml b/source/plugins/contributors/metadata.yml
index 5e0fc9b9..d3a000fb 100644
--- a/source/plugins/contributors/metadata.yml
+++ b/source/plugins/contributors/metadata.yml
@@ -1,6 +1,7 @@
-name: "🏅 Repository contributors"
+name: 🏅 Repository contributors
category: github
-description: This plugin display repositories contributors from a commit range along with additional stats.
+description: |
+ This plugin display repositories contributors from a commit range along with additional stats.
examples:
+by contribution types: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.contributors.categories.svg
by number of contributions: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.contributors.contributions.svg
@@ -12,18 +13,25 @@ scopes:
inputs:
plugin_contributors:
- description: Enable contributors plugin
+ description: |
+ Enable contributors plugin
type: boolean
default: no
plugin_contributors_base:
- description: Base reference (commit, tag, branch, etc.)
+ description: |
+ Base reference
+
+ Can be a commit, tag, branch, etc.
type: string
default: ""
example: commit, tag or branch
plugin_contributors_head:
- description: Head reference (commit, tag, branch, etc.)
+ description: |
+ Head reference
+
+ Can be a commit, tag, branch, etc.
type: string
default: master
@@ -31,22 +39,24 @@ inputs:
description: |
Ignored users
- Useful to ignore bots activity
+ Can be used to ignore bots activity
type: array
format: comma-separated
default: ""
inherits: users_ignored
plugin_contributors_contributions:
- description: Toggle number of contributions display
+ description: |
+ Contributions count
type: boolean
default: no
plugin_contributors_sections:
description: |
Displayed sections
+
- `contributors`: all contributors
- - `categories`: contributors sorted by contributions categories
+ - `categories`: contributors sorted by contributions categories (must be configured with `plugin_contributors_categories`)
type: array
format: comma-separated
default: contributors
@@ -57,9 +67,9 @@ inputs:
plugin_contributors_categories:
description: |
- Configure contribution categories
+ Contribution categories
- This option required `plugin_contributors_sections` to have `categories` in it to be effective
+ This option requires [`plugin_contributors_sections`](/source/plugins/contributors/README.md#plugin_contributors_sections) to have `categories` in it to be effective.
Pass a JSON object mapping category with fileglobs
type: json
default: |
@@ -68,4 +78,6 @@ inputs:
"💻 Code": ["source/**", "src/**"],
"#️⃣ Others": ["*"]
}
- extras: yes
+ extras:
+ - metrics.runner.tempdir
+ - metrics.runner.git
diff --git a/source/plugins/core/metadata.yml b/source/plugins/core/metadata.yml
index 64c8a469..bd651a20 100644
--- a/source/plugins/core/metadata.yml
+++ b/source/plugins/core/metadata.yml
@@ -1,4 +1,4 @@
-name: "🧱 Core"
+name: 🧱 Core
category: core
description: Global configuration and options
supports:
@@ -12,11 +12,10 @@ inputs:
description: |
GitHub Personal Access Token
- No scopes are required by default, though some plugins and features may require additional scopes
+ No scopes are required by default, though some plugins and features may require additional scopes.
- When using a configuration which does not requires a GitHub PAT, you may pass `NOT_NEEDED` instead.
- Note that when doing so, all defaults values using `.user.*` will not be applicable meaning that they need to be filled manually.
- Most of the time `user` option must also be set.
+ When using a configuration which does not requires a GitHub PAT, it is possible to pass `NOT_NEEDED` instead.
+ When doing so, any settings which defaults on user fetched values will not be templated (e.g. `.user.*`) and will usually need to be set manually.
type: token
required: true
@@ -33,7 +32,7 @@ inputs:
description: |
GitHub repository
- This option is revevalant only for repositories templates
+ This option is only revelant for repositories templates
type: string
default: ""
preset: no
@@ -52,7 +51,7 @@ inputs:
description: |
Target branch
- Default value is set to your repository default branch
+ Defaults to current repository default branch
type: string
default: ""
@@ -90,7 +89,8 @@ inputs:
default: TEMPLATE.md
markdown_cache:
- description: Markdown file cache
+ description: |
+ Markdown file cache
type: string
default: .cache
@@ -153,7 +153,8 @@ inputs:
type: array
format: comma-separated
default: ""
- extras: yes
+ extras:
+ - metrics.run.setup.community.templates
template:
description: |
@@ -176,7 +177,6 @@ inputs:
default: "{}"
extras_css:
- extras: yes
description: |
Extra CSS
@@ -184,9 +184,10 @@ inputs:
Useful to avoid creating a new template just to tweak some styling
type: string
default: ""
+ extras:
+ - metrics.run.user.css
extras_js:
- extras: yes
description: |
Extra JavaScript
@@ -197,6 +198,8 @@ inputs:
It is run after transformations and optimizations, but just before resizing.
type: string
default: ""
+ extras:
+ - metrics.run.user.js
config_timezone:
description: |
@@ -278,7 +281,8 @@ inputs:
global: yes
config_animations:
- description: Use CSS animations
+ description: |
+ Use CSS animations
type: boolean
default: yes
global: yes
@@ -336,7 +340,8 @@ inputs:
- insights
config_presets:
- description: Configuration presets
+ description: |
+ Configuration presets
type: array
format: comma-separated
default: ""
@@ -344,28 +349,32 @@ inputs:
example: "@lunar-red"
retries:
- description: Retries in case of failures (for rendering)
+ description: |
+ Retries in case of failures (for rendering)
type: number
default: 3
min: 1
max: 10
retries_delay:
- description: Delay between each retry (in seconds, for rendering)
+ description: |
+ Delay between each retry (in seconds, for rendering)
type: number
default: 300
min: 0
max: 3600
retries_output_action:
- description: Retries in case of failures (for output action)
+ description: |
+ Retries in case of failures (for output action)
type: number
default: 5
min: 1
max: 10
retries_delay_output_action:
- description: Delay between each retry (in seconds, for output action)
+ description: |
+ Delay between each retry (in seconds, for output action)
type: number
default: 120
min: 0
@@ -442,7 +451,8 @@ inputs:
max: 30
notice_releases:
- description: Notice about new releases of metrics
+ description: |
+ Notice about new releases of metrics
type: boolean
default: yes
@@ -481,7 +491,8 @@ inputs:
preset: no
verify:
- description: SVG validity check
+ description: |
+ SVG validity check
type: boolean
default: no
testing: yes
@@ -504,7 +515,8 @@ inputs:
preset: no
debug_print:
- description: Print output in console
+ description: |
+ Print output in console
type: boolean
default: no
testing: yes
@@ -534,7 +546,8 @@ inputs:
preset: no
use_mocked_data:
- description: Use mocked data instead of live APIs
+ description: |
+ Use mocked data instead of live APIs
type: boolean
default: no
testing: yes
diff --git a/source/plugins/discussions/metadata.yml b/source/plugins/discussions/metadata.yml
index e7bbb351..37da9624 100644
--- a/source/plugins/discussions/metadata.yml
+++ b/source/plugins/discussions/metadata.yml
@@ -1,6 +1,7 @@
-name: "💬 Discussions"
+name: 💬 Discussions
category: github
-description: This plugin displays your GitHub discussions stats.
+description: |
+ This plugin displays GitHub discussions stats.
examples:
default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.discussions.svg
index: 16
@@ -11,12 +12,14 @@ scopes:
inputs:
plugin_discussions:
- description: Enable discussions plugin
+ description: |
+ Enable discussions plugin
type: boolean
default: no
plugin_discussions_categories:
- description: Toggle discussion categories display
+ description: |
+ Discussion categories
type: boolean
default: yes
@@ -24,7 +27,7 @@ inputs:
description: |
Display limit (categories)
- Note that categories are sorted from highest to lowest count.
+ Note that categories are sorted from highest to lowest count
type: number
default: 0
zero: disable
\ No newline at end of file
diff --git a/source/plugins/followup/metadata.yml b/source/plugins/followup/metadata.yml
index 725cf719..cb593d0d 100644
--- a/source/plugins/followup/metadata.yml
+++ b/source/plugins/followup/metadata.yml
@@ -1,6 +1,7 @@
-name: "🎟️ Follow-up of issues and pull requests"
+name: 🎟️ Follow-up of issues and pull requests
category: github
-description: This plugin displays the ratio of open/closed issues and the ratio of open/merged pull requests across all your repositories.
+description: |
+ This plugin displays the ratio of open/closed issues and the ratio of open/merged pull requests across repositories.
examples:
+indepth analysis: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.followup.indepth.svg
created on a user's repositories: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.followup.svg
@@ -15,13 +16,15 @@ scopes:
inputs:
plugin_followup:
- description: Enable followup plugin
+ description: |
+ Enable followup plugin
type: boolean
default: no
plugin_followup_sections:
description: |
Displayed sections
+
- `repositories`: overall status of issues and pull requests on your repositories
- `user`: overall status of issues and pull requests you have created on GitHub
type: array
@@ -32,12 +35,15 @@ inputs:
- user
plugin_followup_indepth:
- description: Indepth analysis
+ description: |
+ Indepth analysis
type: boolean
default: no
- extras: yes
+ extras:
+ - metrics.api.github.overuse
plugin_followup_archived:
- description: Include Issues and Pull requests on the archived repositories.
+ description: |
+ Include archived repositories
type: boolean
default: yes
\ No newline at end of file
diff --git a/source/plugins/gists/metadata.yml b/source/plugins/gists/metadata.yml
index 9145961b..f09cbd60 100644
--- a/source/plugins/gists/metadata.yml
+++ b/source/plugins/gists/metadata.yml
@@ -1,6 +1,7 @@
-name: "🎫 Gists"
+name: 🎫 Gists
category: github
-description: This plugin displays [gists](https://gist.github.com) stats.
+description: |
+ This plugin displays [gists](https://gist.github.com) stats.
examples:
default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.gists.svg
index: 21
@@ -11,6 +12,7 @@ scopes:
inputs:
plugin_gists:
- description: Enable gists plugin
+ description: |
+ Enable gists plugin
type: boolean
default: no
diff --git a/source/plugins/habits/metadata.yml b/source/plugins/habits/metadata.yml
index 3bfd6b54..13bba660 100644
--- a/source/plugins/habits/metadata.yml
+++ b/source/plugins/habits/metadata.yml
@@ -1,6 +1,7 @@
-name: "💡 Coding habits"
+name: 💡 Coding habits and activity
category: github
-description: This plugin display coding habits based on your recent activity, such as active hours and languages recently used.
+description: |
+ This plugin displays coding habits based on recent activity, such as active hours and languages recently used.
examples:
+recent activity charts: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.habits.charts.svg
+midly interesting facts: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.habits.facts.svg
@@ -13,7 +14,8 @@ scopes:
inputs:
plugin_habits:
- description: Enable habits plugin
+ description: |
+ Enable habits plugin
type: boolean
default: no
@@ -28,7 +30,8 @@ inputs:
max: 1000
plugin_habits_days:
- description: Event maximum age
+ description: |
+ Event maximum age
type: number
default: 14
min: 1
@@ -36,25 +39,29 @@ inputs:
plugin_habits_facts:
description: |
- Toggle midly interesting facts display
+ Midly interesting facts
It includes indentation type, average number of characters per line of code, and most active time and day
type: boolean
default: yes
plugin_habits_charts:
- extras: yes
description: |
- Toggle charts display
+ Charts
It includes commit activity per hour of day and commit activity per day of week
Recent language activity may also displayed (it requires extras features to be enabled for web instances) for historical reasons
type: boolean
default: no
+ extras:
+ - metrics.api.github.overuse
+ - metrics.run.tempdir
+ - metrics.run.git
plugin_habits_charts_type:
description: |
Charts display type
+
- `classic`: `
` based charts, simple and lightweight
- `chartist`: `