metrics Documentation

An infographics generator with 30+ plugins and 300+ options to display stats about your GitHub account and render them as SVG, Markdown, PDF or JSON!

RAW Doc

File: README.md

Generate metrics that can be embedded everywhere, including your GitHub profile readme! Supports users, organizations, and even repositories!

For user accounts For organization accounts
๐Ÿงฉ Customizable with 47 plugins and 335 options!
๐Ÿ“… Isometric commit calendar ๐Ÿˆท๏ธ Languages activity
Full year calendar
text
Half year calendar | Indepth analysis (clone and analyze repositories)
    Recently used (analyze recent activity events)
    Default algorithm
    Default algorithm (with details) |

| โœจ Stargazers | ๐Ÿ‘จโ€๐Ÿ’ป Lines of code changed |
| Classic charts
Graph charts
Worldmap | Repositories and diff history
Compact display in base plugin |
| ๐Ÿ“Œ Starred topics | ๐ŸŒŸ Recently starred repositories |
| With icons
With labels | |
| ๐Ÿ“œ Repository licenses | ๐Ÿ’ก Coding habits and activity |
| Permissions, limitations and conditions
Licenses overview | Recent activity charts
Mildly interesting facts |
| ๐Ÿ… Repository contributors | ๐ŸŽŸ๏ธ Follow-up of issues and pull requests |
| By contribution types
By number of contributions | Indepth analysis
Created on a user's repositories
Created by a user |
| ๐ŸŽญ Comment reactions | ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘ People |
| | Related to a user
Related to a repository |
| ๐Ÿ’ GitHub Sponsorships | ๐Ÿ’• GitHub Sponsors |
| | GitHub sponsors card
GitHub sponsors full introduction |
| ๐Ÿ““ Featured repositories | ๐Ÿ’ฌ Discussions |
| Featured
Pinned | |
| ๐Ÿ’ซ Star lists | ๐Ÿ“† Commit calendar |
| Repositories from star lists
Languages from star lists | Current year
Full history |
| ๐Ÿ† Achievements | ๐ŸŽฉ Notable contributions |
| Compact display
Detailed display | Indepth analysis
Contributions in organizations only |
| ๐Ÿ“ฐ Recent activity | ๐Ÿงฎ Repositories traffic |
| | |
| โ™ Random code snippet | ๐ŸŽซ Gists |
| | |
| ๐Ÿ—‚๏ธ GitHub projects | ๐Ÿ™‹ Introduction |
| | For a user or an organization
For a repository |
| ๐ŸŒ‡ GitHub Skyline | โฑ๏ธ Google PageSpeed |
| GitHub Skyline
GitHub City | PageSpeed scores
PageSpeed scores with detailed report
PageSpeed scores with a website screenshot |
| ๐Ÿ—จ๏ธ Stack Overflow | ๐ŸŒธ Anilist watch list and reading list |
| | For anime watchers
For manga readers
For waifus simp |
| ๐ŸŽผ Music activity and suggestions | โœ’๏ธ Recent posts |
| Random tracks from a playlist
Recently listened | Latest posts width description and cover image
Latest posts |
| ๐Ÿ—ผ Rss feed | โฐ WakaTime |
| | |
| ๐Ÿ—ณ๏ธ Leetcode | ๐Ÿ•น๏ธ Steam |
| | Recently played games
Profile and detailed game history |
| ๐ŸŽฒ See also community plugins | |
| ๐Ÿง  16personalitiesby @lowlighter
Render example | โ™Ÿ๏ธ Chessby @lowlighter
Render example |
| ๐Ÿช™ Cryptoby @dajneem23
Render example | ๐Ÿฅ  Fortuneby @lowlighter
Render example |
| ๐Ÿ’‰ Nightscoutby @legoandmars
Render example | ๐Ÿ’ฉ PoopMap pluginby @matievisthekat
Render example |
| ๐Ÿ“ธ Website screenshotby @lowlighter
Render example | ๐Ÿฆ‘ Splatoonby @lowlighter
Render example |
| ๐Ÿ’น Stock pricesby @lowlighter
Render example | |
| ๐Ÿ–ผ๏ธ And even more with 4+ templates! | |
| ๐Ÿ“— Classic template | ๐Ÿ“˜ Repository template |
| | |
| ๐Ÿ“™ Terminal template | ๐Ÿ“’ Markdown template |
| | |
| ๐Ÿ“• See also community templates | |
| ๐Ÿฆ‘ Try it now! | |
| ๐Ÿ“Š Metrics embed | โœจ Metrics insights |
| Embed metrics images on your profile or blog!
Use GitHub actions for even more features! | Share your metrics with friends and on social medias!
No configuration needed! |
| Test latest features and patches on [๐Ÿงช Metrics beta](https://beta-metrics.lecoq.io)! | |
| Power user?
Fork this repository and edit HTML, CSS, JS and EJS for even more customization! | |

๐Ÿ“š Documentation

โš ๏ธ This is the documentation of v3.35-beta (@master/@main branches) which includes unreleased features planned for next release. See documentation for current released version v3.34 (@latest branch) here.

๐Ÿฆฎ Setup

There are several ways to setup metrics, each having its advantages and disadvantages:

Additional resources for setup:

๐Ÿ–ผ๏ธ Templates

Templates lets you change general appearance of rendered metrics.

๐Ÿงฉ Plugins

Plugins provide additional content and lets you customize rendered metrics.

๐Ÿ“ฆ Maintained by core team

๐ŸŽฒ Maintained by community

๐Ÿ’ช Contributing

If you are interested in contributing, the following resources may interest you:

Use ๐Ÿ’ฌ discussions for feedback, new features suggestions, bugs reports or to request help for installation.

๐Ÿ“œ License

text
MIT License
Copyright (c) 2020-present lowlighter

File: source/plugins/reactions/README.md

โ† Back to plugins index
๐ŸŽญ Comment reactions
This plugin displays overall user reactions on recent issues, comments and discussions.
โš ๏ธ Disclaimer This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with GitHub.
All product and company names are trademarksโ„ข or registeredยฎ trademarks of their respective holders.
Supported featuresโ†’ Full specification ๐Ÿ“— Classic template
๐Ÿ‘ค Users
๐Ÿ”‘ (scopeless) read:org (optional) read:user (optional) read:packages (optional) repo (optional)

โžก๏ธ Available options

Option Description
plugin_reactions Enable reactions plugin
type: boolean

default: no | |
| plugin_reactions_limit | Display limit (issues and pull requests comments) |
| type: number
(0 โ‰ค
๐‘ฅ
โ‰ค 1000)

default: 200 | |
| plugin_reactions_limit_issues | Display limit (issues and pull requests, first comment) |
| type: number
(0 โ‰ค
๐‘ฅ
โ‰ค 1000)

default: 100 | |
| plugin_reactions_limit_discussions | Display limit (discussions, first comment) |
| type: number
(0 โ‰ค
๐‘ฅ
โ‰ค 1000)

default: 100 | |
| plugin_reactions_limit_discussions_comments | Display limit (discussions comments) |
| type: number
(0 โ‰ค
๐‘ฅ
โ‰ค 1000)

default: 100 | |
| plugin_reactions_days | Comments maximum age |
| type: number
(0 โ‰ค
๐‘ฅ)

zero behaviour: disable
default: 0 | |
| plugin_reactions_display | Display mode

absolute: scale percentages using total reactions count
relative: scale percentages using highest reaction count |
| type: string

default: absolute
**allowed values:**absoluterelative | |
| plugin_reactions_details | Additional details |
| type: array
(comma-separated)

**allowed values:**countpercentage | |
| plugin_reactions_ignored | Ignored users
Can be used to ignore bots activity |
| โฉ Inherits users_ignored
type: array
(comma-separated) | |

โ„น๏ธ Examples workflows

yaml
name: Comment reactions
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.reactions.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: ""
  plugin_reactions: yes
  plugin_reactions_limit: 100
  plugin_reactions_details: percentage

File: source/plugins/projects/README.md

โ† Back to plugins index
๐Ÿ—‚๏ธ GitHub projects
This plugin displays progress of profile and repository projects.
โš ๏ธ Disclaimer This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with GitHub.
All product and company names are trademarksโ„ข or registeredยฎ trademarks of their respective holders.
Supported featuresโ†’ Full specification ๐Ÿ“— Classic template ๐Ÿ“˜ Repository template
๐Ÿ‘ค Users ๐Ÿ‘ฅ Organizations ๐Ÿ““ Repositories
๐Ÿ”‘ (scopeless) ๐Ÿ”‘ public_repo ๐Ÿ”‘ read:project read:org (optional) read:user (optional) read:packages (optional) repo (optional)

โžก๏ธ Available options

Option Description
plugin_projects Enable projects plugin
type: boolean

default: no | |
| plugin_projects_limit | Display limit
Projects defined by plugin_projects_repositories are not affected by this option |
| type: number
(0 โ‰ค
๐‘ฅ
โ‰ค 100)

default: 4 | |
| plugin_projects_repositories | Featured repositories projects
Use the following syntax for each project :user/:repo/projects/:project_id

โ„น๏ธ GitHub projects (beta) needs to use the same syntax as above and repository must specified repository must be linked to given project. |
| โฏ๏ธ Cannot be preset
type: array
(comma-separated) | |
| plugin_projects_descriptions | Projects descriptions |
| type: boolean

default: no | |

๐Ÿ”„ Enabling progress tracking

By default, projects have progress tracking disabled.

To enable it, open the โ‰ก Menu from the project page and opt-in to Track project progress.

๐Ÿ‘ค Use personal projects

To create a personal project, select the Projects tab from your profile:

Fill informations and set visibility to public:

๐Ÿ““ Use repositories projects

Repositories projects are created from the Projects tab of a repository.

To use it with this plugin, retrieve the last section of the project URL (it should match the format :user/:repository/projects/:project_id) and add it in the plugin_projects_repositories.

Be sure to tick Track project progress in project settings to display a progress bar.

Example: include a project repository

yml
- uses: lowlighter/metrics@latest
  with:
    plugin_projects: yes
    plugin_projects_repositories: lowlighter/metrics/projects/1

โ„น๏ธ Examples workflows

yaml
name: Project from a repository
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.projects.svg
  token: ${{ secrets.METRICS_TOKEN_WITH_SCOPES }}
  base: ""
  plugin_projects: yes
  plugin_projects_repositories: lowlighter/metrics/projects/1
  plugin_projects_descriptions: yes

File: source/plugins/posts/README.md

โ† Back to plugins index
โœ’๏ธ Recent posts
This plugin displays recent articles from a specified and supported external source.
Supported featuresโ†’ Full specification ๐Ÿ“— Classic template ๐Ÿ“’ Markdown template ๐Ÿ“˜ Repository template
๐Ÿ‘ค Users ๐Ÿ‘ฅ Organizations ๐Ÿ““ Repositories
No tokens are required for this plugin
Latest posts width description and cover image
text
Latest posts |  |

โžก๏ธ Available options

Option Description
plugin_posts Enable posts plugin
type: boolean

default: no | |
| plugin_posts_source | External source

dev.to: dev.to
hashnode: hashnode.com |
| type: string

**allowed values:**dev.tohashnode | |
| plugin_posts_user | External source username |
| โฏ๏ธ Cannot be preset
type: string

default: โ†’ User login | |
| plugin_posts_descriptions | Posts descriptions |
| type: boolean

default: no | |
| plugin_posts_covers | Posts cover images |
| type: boolean

default: no | |
| plugin_posts_limit | Display limit |
| type: number
(1 โ‰ค
๐‘ฅ
โ‰ค 30)

default: 4 | |

โ„น๏ธ Examples workflows

yaml
name: Recent posts
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.posts.svg
  token: NOT_NEEDED
  base: ""
  plugin_posts: yes
  plugin_posts_source: dev.to
yaml
name: Recent posts with descriptions and cover images
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.posts.full.svg
  token: NOT_NEEDED
  base: ""
  plugin_posts: yes
  plugin_posts_source: dev.to
  plugin_posts_limit: 2
  plugin_posts_descriptions: yes
  plugin_posts_covers: yes

File: source/plugins/people/README.md

โ† Back to plugins index
๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘ People
This plugin can display relationships with users, such as followers, sponsors, contributors, stargazers, watchers, members, etc.
โš ๏ธ Disclaimer This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with GitHub.
All product and company names are trademarksโ„ข or registeredยฎ trademarks of their respective holders.
Supported featuresโ†’ Full specification ๐Ÿ“— Classic template ๐Ÿ“˜ Repository template
๐Ÿ‘ค Users ๐Ÿ‘ฅ Organizations ๐Ÿ““ Repositories
๐Ÿ”‘ (scopeless) read:org (optional) read:user (optional) read:packages (optional) repo (optional)
Related to a user
text
Related to a repository |  |

โžก๏ธ Available options

Option Description
plugin_people Enable people plugin
type: boolean

default: no | |
| plugin_people_limit | Display limit |
| type: number
(0 โ‰ค
๐‘ฅ)

zero behaviour: disable
default: 24 | |
| plugin_people_identicons | Force identicons pictures
Can be used to mask profile pictures for privacy |
| type: boolean

default: no | |
| plugin_people_identicons_hide | Hide identicons pictures
Can be used to mask users without a personal profile picture.
When used with plugin_people_identicons, users without a personal profile picture will still be filtered out, but their picture will be replaced by an identicon instead |
| type: boolean

default: no | |
| plugin_people_size | Profile picture display size |
| type: number
(8 โ‰ค
๐‘ฅ
โ‰ค 64)

default: 28 | |
| plugin_people_types | Displayed sections
User and organization accounts support the following values:

followers
following/followed
sponsoring/sponsored
sponsors
members (organization only)
thanks(to be configured with plugin_people_thanks)

Repositories support the following values:

sponsors (same as owner sponsors)
contributors
stargazers
watchers
thanks(to be configured with plugin_people_thanks)

Specified order is honored |
| type: array
(comma-separated)

default: followers, following
**allowed values:**followersfollowingfollowedsponsoringmemberssponsoredsponsorscontributorsstargazerswatchersthanks | |
| plugin_people_thanks | Special thanks
Can be used to thank specific users |
| โฏ๏ธ Cannot be preset
type: array
(comma-separated) | |
| plugin_people_sponsors_custom | Custom sponsors
This list can be used to add users from unsupported GitHub sponsors sources.
The option plugin_people_types must contain the sponsors section in order for this setting to be effective |
| โฏ๏ธ Cannot be preset
type: array
(comma-separated) | |
| plugin_people_shuffle | Shuffle data
Can be used to create varied outputs
This will fetch additional data (10 times plugin_people_limit) to ensure output is always different |
| type: boolean

default: no | |

โ„น๏ธ Examples workflows

yaml
name: Followers
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.people.followers.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: ""
  plugin_people: yes
  plugin_people_types: followers
yaml
name: Contributors and sponsors
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.people.repository.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: ""
  template: repository
  repo: metrics
  plugin_people: yes
  plugin_people_types: contributors, stargazers, watchers, sponsors

File: source/plugins/pagespeed/README.md

โ† Back to plugins index
โฑ๏ธ Google PageSpeed
This plugin displays performance statistics of a website.
It uses Google's PageSpeed API (same as web.dev), see performance scoring and score calculator for more informations about results.
โš ๏ธ Disclaimer This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with Google PageSpeed.
All product and company names are trademarksโ„ข or registeredยฎ trademarks of their respective holders.
Supported featuresโ†’ Full specification ๐Ÿ“— Classic template ๐Ÿ“˜ Repository template ๐Ÿ“™ Terminal template
๐Ÿ‘ค Users ๐Ÿ‘ฅ Organizations ๐Ÿ““ Repositories
๐Ÿ—๏ธ plugin_pagespeed_token
PageSpeed scores
text
PageSpeed scores with detailed report
  PageSpeed scores with a website screenshot |  |

โžก๏ธ Available options

Option Description
plugin_pagespeed Enable pagespeed plugin
type: boolean

default: no | |
| plugin_pagespeed_token | PageSpeed token

โš ๏ธ While not mandatory, it is strongly advised pass a token to avoid triggering the rate limiter. See PageSpeed documentation for more informations. |
| ๐Ÿ” Token
๐ŸŒ Web instances must configure settings.json:

metrics.api.google.pagespeed

type: token | |
| plugin_pagespeed_url | Audited website |
| โฏ๏ธ Cannot be preset
type: string

default: โ†’ User attached website | |
| plugin_pagespeed_detailed | Detailed results
The following additional stats will be displayed:

First Contentful Paint
Speed Index
Largest Contentful Paint
Time to Interactive
Total Blocking Time
Cumulative Layout Shift |
| type: boolean

default: no | |
| plugin_pagespeed_screenshot | Website screenshot
Significantly increase filesize |
| type: boolean

default: no | |
| plugin_pagespeed_pwa | PWA Status |
| type: boolean

default: no | |

โ„น๏ธ Examples workflows

yaml
name: Succinct report
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.pagespeed.svg
  token: NOT_NEEDED
  base: ""
  plugin_pagespeed: yes
  plugin_pagespeed_token: ${{ secrets.PAGESPEED_TOKEN }}
  plugin_pagespeed_url: https://lecoq.io
yaml
name: Detailed report
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.pagespeed.detailed.svg
  token: NOT_NEEDED
  base: ""
  plugin_pagespeed: yes
  plugin_pagespeed_detailed: yes
  plugin_pagespeed_token: ${{ secrets.PAGESPEED_TOKEN }}
  plugin_pagespeed_url: https://lecoq.io
yaml
name: Screenshot
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.pagespeed.screenshot.svg
  token: NOT_NEEDED
  base: ""
  plugin_pagespeed: yes
  plugin_pagespeed_screenshot: yes
  plugin_pagespeed_token: ${{ secrets.PAGESPEED_TOKEN }}
  plugin_pagespeed_url: https://lecoq.io
yaml
name: Succinct report with PWA
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.pagespeed.svg
  token: NOT_NEEDED
  base: ""
  plugin_pagespeed: yes
  plugin_pagespeed_token: ${{ secrets.PAGESPEED_TOKEN }}
  plugin_pagespeed_url: https://lecoq.io
  plugin_pagespeed_pwa: yes

File: source/plugins/notable/README.md

โ† Back to plugins index
๐ŸŽฉ Notable contributions
This plugin displays badges for notable contributions on repositories.
โš ๏ธ Disclaimer This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with GitHub.
All product and company names are trademarksโ„ข or registeredยฎ trademarks of their respective holders.
Supported featuresโ†’ Full specification ๐Ÿ“— Classic template
๐Ÿ‘ค Users
๐Ÿ”‘ (scopeless) read:org (optional) read:user (optional) read:packages (optional) repo (optional)
Indepth analysis
text
Contributions in organizations only |  |

โžก๏ธ Available options

Option Description
plugin_notable Enable notable plugin
type: boolean

default: no | |
| plugin_notable_filter | Query filter
Based on GitHub search syntax.
Supported fields are stars, forks and watchers
If plugin_notable_indepth is enabled, commits, commits.user, commits.user% and maintainer fields are also supported.
Some repositories may not be able to reported advanced stats and in the case the default behaviour will be to bypass filtering |
| type: string | |
| plugin_notable_skipped | Skipped repositories |
| โฉ Inherits repositories_skipped
type: array
(newline-separated) | |
| plugin_notable_from | Repository owner account type filter

all: no filtering
organization: only organization accounts repositories
user: only user accounts repositories |
| type: string

default: organization
**allowed values:**allorganizationuser | |
| plugin_notable_repositories | Repository name
Repositories hosted by user account will always have their full handle displayed |
| type: boolean

default: no | |
| plugin_notable_indepth | Indepth mode |
| ๐ŸŒ Web instances must configure settings.json:

metrics.api.github.overuse

type: boolean

default: no | |
| plugin_notable_types | Contribution types filter
Use a combination of below values to include repositories where:

commit: a commit on default branch was made
pull_request: a pull request was opened
issue: an issue was opened |
| type: array
(comma-separated)

default: commit
**allowed values:**commitpull_requestissue | |
| plugin_notable_self | Include own repositories |
| type: boolean

default: no | |

๐Ÿ”Ž `indepth` mode

The plugin_notable_indepth option collects additional stats about your contributions, such as:

  • Total number of commits within a repository or organization.

For each of the above, a badge is awarded. Its color and progress depends of the associated value.

โ„น๏ธ Examples workflows

yaml
name: Contributions
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.notable.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: ""
  plugin_notable: yes
yaml
name: Indepth analysis
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.notable.indepth.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: ""
  plugin_notable: yes
  plugin_notable_indepth: yes
  plugin_notable_repositories: yes

File: source/plugins/music/README.md

โ† Back to plugins index
๐ŸŽผ Music activity and suggestions
This plugin can display top and recently listened music tracks or titles from a random playlist.
Different music providers are supported.
โš ๏ธ Disclaimer 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.
Supported featuresโ†’ Full specification ๐Ÿ“— Classic template
๐Ÿ‘ค Users ๐Ÿ‘ฅ Organizations
๐Ÿ—๏ธ plugin_music_token
Random tracks from a playlist
text
Recently listened |  |

โžก๏ธ Available options

Option Description
plugin_music Enable music plugin
๐ŸŒ Web instances must configure settings.json:

metrics.run.puppeteer.scrapping

type: boolean

default: no | |
| plugin_music_provider | Music provider

apple: Apple Music
spotify: Spotify
lastfm: Last.fm
youtube: YouTube Music

This setting is optional when using plugin_music_mode: playlist (provider will be auto-detected from plugin_music_playlist URL) |
| type: string

**allowed values:**applespotifylastfmyoutube | |
| plugin_music_token | Music provider token
Below is the expected token format for each provider:

apple: (not supported)
spotify: "client_id, client_secret, refresh_token"
lastfm: "api_key"
youtube: "cookie" |
| ๐Ÿ” Token
๐ŸŒ Web instances must configure settings.json:

metrics.api.music.any

type: token | |
| plugin_music_user | Music provider username |
| โฏ๏ธ Cannot be preset
type: string

default: โ†’ User login | |
| plugin_music_mode | Display mode

playlist: display random tracks from an URL playlist
recent: display recently listened tracks
top: display top listened artists/tracks

If plugin_music_playlist is specified, the default value is playlist, else it is recent |
| type: string

**allowed values:**playlistrecenttop | |
| plugin_music_playlist | Playlist URL
It must be from an "embed url" (i.e. music player iframes that can be integrated in other websites) |
| โฏ๏ธ Cannot be preset
type: string | |
| plugin_music_limit | Display limit |
| type: number
(1 โ‰ค
๐‘ฅ
โ‰ค 100)

default: 4 | |
| plugin_music_played_at | Recently played - Last played timestamp |
| type: boolean

default: no | |
| plugin_music_time_range | Top tracks - Time range

short: 4 weeks
medium: 6 months
long: several years |
| type: string

default: short
**allowed values:**shortmediumlong | |
| plugin_music_top_type | Top tracks - Display type

tracks: display track
artists: display artists |
| type: string

default: tracks
**allowed values:**tracksartists | |

๐ŸŽบ Configuring music provider

Select a music provider below for additional instructions.

๐ŸŽ™๏ธ Spotify

๐Ÿ—๏ธ Obtaining a token

Spotify does not have personal tokens, so it makes the process a bit longer because it is required to follow the authorization workflow... Follow the instructions below for a TL;DR to obtain a refresh_token.

Sign in to the developer dashboard and create a new app.
Keep your client_id and client_secret and let this tab open for now.

Open the settings and add a new Redirect url. Normally it is used to setup callbacks for apps, but just put https://localhost instead (it is mandatory as per the authorization guide, even if not used).

Forge the authorization url with your client_id and the encoded redirect_uri you whitelisted, and access it from your browser:

text
https://accounts.spotify.com/authorize?client_id=********&response_type=code&scope=user-read-recently-played%20user-top-read&redirect_uri=https%3A%2F%2Flocalhost

When prompted, authorize application.

Once redirected to redirect_uri, extract the generated authorization code from your url bar.

Go back to developer dashboard tab, and open the web console of your browser to paste the following JavaScript code, with your own client_id, client_secret, authorization code and redirect_uri.

js
(async () => {
  console.log(await (await fetch("https://accounts.spotify.com/api/token", {
    method:"POST",
    headers:{"Content-Type":"application/x-www-form-urlencoded"},
    body:new URLSearchParams({
      grant_type:"authorization_code",
      redirect_uri:"https://localhost",
      client_id:"********",
      client_secret:"********",
      code:"********",
    })
  })).json())
})()

It should return a JSON response with the following content:

json
{
  "access_token":"********",
  "expires_in": 3600,
  "scope":"user-read-recently-played user-top-read",
  "token_type":"Bearer",
  "refresh_token":"********"
}

Register your client_id, client_secret and refresh_token in secrets to finish setup.

๐Ÿ”— Get an embed playlist url for `plugin_music_playlist`

Connect to spotify.com and select the playlist you want to share.
From ... menu, select Share and Copy embed code.

Extract the source link from the code pasted in your clipboard:

html

๐ŸŽ Apple Music

๐Ÿ—๏ธ Obtaining a token

(Not available)

๐Ÿ˜ฅ Unfortunately I wasn't able to find a workaround to avoid paying the $99 fee for the developer program, even using workarounds like smart playlists, shortcuts and other stuff. However if you really want this feature, you could sponsor me and I could eventually invest in a developer account with enough money, implement it and also eventually offer service on the shared instance

๐Ÿ”— Get an embed playlist url for `plugin_music_playlist`

Connect to music.apple.com and select the playlist you want to share.
From ... menu, select Share and Copy embed code.

Extract the source link from the code pasted in your clipboard:

html

โฏ๏ธ Youtube Music

๐Ÿ—๏ธ Obtaining a token

Login to YouTube Music on any modern browser.

Open the developer tools (Ctrl-Shift-I) and select the โ€œNetworkโ€ tab

Find an authenticated POST request. The simplest way is to filter by /browse using the search bar of the developer tools. If you donโ€™t see the request, try scrolling down a bit or clicking on the library button in the top bar.

Click on the Name of any matching request. In the โ€œHeadersโ€ tab, scroll to the โ€œCookieโ€ and copy this by right-clicking on it and selecting โ€œCopy valueโ€.

๐Ÿ”— Get an embed playlist url for `plugin_music_playlist`

Extract the playlist URL of the playlist you want to share.

Connect to music.youtube.com and select the playlist you want to share.

Extract the source link from the code pasted in your clipboard:

text
https://music.youtube.com/playlist?list=********

๐Ÿ“ป Last.fm

๐Ÿ—๏ธ Obtaining a token

Create an API account or use an existing one to obtain a Last.fm API key.

๐Ÿ”— Get an embed playlist url for `plugin_music_playlist`

(Not available)

โ„น๏ธ Examples workflows

yaml
name: Apple Music - Random track from playlist
uses: lowlighter/metrics@latest
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
yaml
name: Spotify - Random track from playlist
uses: lowlighter/metrics@latest
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
yaml
name: Spotify - Recently listed
uses: lowlighter/metrics@latest
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
yaml
name: Spotify - Top tracks
uses: lowlighter/metrics@latest
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
yaml
name: Spotify - Top artists
uses: lowlighter/metrics@latest
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
yaml
name: Youtube Music - Random track from playlist
uses: lowlighter/metrics@latest
with:
  token: NOT_NEEDED
  base: ""
  plugin_music: yes
  plugin_music_playlist: >-
    https://music.youtube.com/playlist?list=OLAK5uy_kU_uxp9TUOl9zVdw77xith8o9AknVwz9U
yaml
name: Youtube Music - Recently listed
uses: lowlighter/metrics@latest
with:
  token: NOT_NEEDED
  base: ""
  plugin_music_token: ${{ secrets.YOUTUBE_MUSIC_TOKENS }}
  plugin_music: yes
  plugin_music_mode: recent
  plugin_music_provider: youtube
yaml
name: Last.fm  - Recently listed
uses: lowlighter/metrics@latest
with:
  token: NOT_NEEDED
  base: ""
  plugin_music_token: ${{ secrets.LASTFM_TOKEN }}
  plugin_music: yes
  plugin_music_provider: lastfm
  plugin_music_user: RJ

File: source/plugins/lines/README.md

โ† Back to plugins index
๐Ÿ‘จโ€๐Ÿ’ป Lines of code changed
This plugin displays the number of lines of code added and removed across repositories.
โš ๏ธ Disclaimer This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with GitHub.
All product and company names are trademarksโ„ข or registeredยฎ trademarks of their respective holders.
Supported featuresโ†’ Full specification ๐Ÿ“— Classic template ๐Ÿ“˜ Repository template ๐Ÿ“™ Terminal template
๐Ÿ‘ค Users ๐Ÿ‘ฅ Organizations ๐Ÿ““ Repositories
๐Ÿ”‘ (scopeless) read:org (optional) read:user (optional) read:packages (optional) repo (optional)
Repositories and diff history
text
Compact display in base plugin |  |

โžก๏ธ Available options

Option Description
plugin_lines Enable lines plugin
type: boolean

default: no | |
| plugin_lines_skipped | Skipped repositories |
| โฉ Inherits repositories_skipped
type: array
(newline-separated) | |
| plugin_lines_sections | Displayed sections

base will display the total lines added and removed in base.repositories section
repositories will display repositories with the most lines added and removed
history will display a graph displaying lines added and removed over time

โ„น๏ธ base requires at least base: repositories to be set |
| type: array
(comma-separated)

default: base
**allowed values:**baserepositorieshistory | |
| plugin_lines_repositories_limit | Display limit |
| type: number
(0 โ‰ค
๐‘ฅ)

default: 4 | |
| plugin_lines_history_limit | Years to display
Will display the last n years, relative to current year |
| type: number

zero behaviour: disable
default: 1 | |
| plugin_lines_delay | Delay before performing a second query
When non-zero, will perform a second query after specified delay (in seconds).
The GitHub endpoint used may return inaccurate results on first query (these values seems to be cached on the fly),
after returning correct results upon performing another query.
Using this option may mitigate the occurrence of weird values. |
| type: number
(0 โ‰ค
๐‘ฅ)

zero behaviour: disable
default: 0 | |

โ„น๏ธ Examples workflows

yaml
name: Compact display in base plugin
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.lines.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: repositories
  plugin_lines: yes
  plugin_lines_delay: 30
yaml
name: Repositories and diff history
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.lines.history.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: ""
  plugin_lines: yes
  plugin_lines_delay: 30
  plugin_lines_sections: repositories, history
  plugin_lines_repositories_limit: 2
  plugin_lines_history_limit: 1
  repositories_skipped: |
    @use.patterns
    */*
    +lowlighter/metrics

File: source/plugins/licenses/README.md

โ† Back to plugins index
๐Ÿ“œ Repository licenses
This plugin display repository license informations like permissions, limitations and conditions along with additional stats about dependencies.
โš ๏ธ Disclaimer This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with GitHub.
All product and company names are trademarksโ„ข or registeredยฎ trademarks of their respective holders.
โ„น Additional notes โš ๏ธ This is NOT legal advice, use at your own risk

๐Ÿ’ฃ This plugin SHOULD NOT be enabled on web instances, since it allows raw command injection.
This could result in compromised server! |
| Supported featuresโ†’ Full specification | ๐Ÿ“˜ Repository template |
| ๐Ÿ““ Repositories | |
| ๐Ÿ”‘ (scopeless) read:org (optional) read:user (optional) read:packages (optional) repo (optional) | |
| Permissions, limitations and conditions
Licenses overview | |

๐Ÿ”Ž Licenses analysis

Use to plugin_licenses_setup command to setup project dependencies.

Example: setup a NodeJS project using npm ci

yml
- name: Licenses and permissions
  with:
    repo: metrics
    plugin_licenses: yes
    plugin_licenses_setup: npm ci

Dependencies will be analyzed by GitHub licensed and compared against GitHub known licenses.

โš ๏ธ This is NOT legal advice, use at your own risk

๐Ÿ’ฃ This plugin SHOULD NOT be enabled on web instances, since it allows raw command injection.
This could result in compromised server!

โžก๏ธ Available options

Option Description
plugin_licenses Enable licenses plugin
๐ŸŒ Web instances must configure settings.json:

metrics.cpu.overuse
metrics.run.tempdir
metrics.run.git
metrics.run.licensed
metrics.run.user.cmd

type: boolean

default: no | |
| plugin_licenses_setup | Setup command

โ„น๏ธ Depending on the project, this may not be required.
The example command is intended for NodeJs projects that use npm to install their dependencies. |
| type: string | |
| plugin_licenses_ratio | Used licenses ratio |
| type: boolean

default: no | |
| plugin_licenses_legal | Permissions, limitations and conditions about used licenses |
| type: boolean

default: yes | |

โ„น๏ธ Examples workflows

yaml
name: Licenses and permissions
with:
  filename: metrics.plugin.licenses.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: ""
  template: repository
  repo: metrics
  plugin_licenses: yes
  plugin_licenses_setup: bash -c '[[ -f package.json ]] && npm ci || true'
yaml
name: Licenses with open-source ratio graphs
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.licenses.ratio.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: ""
  template: repository
  repo: metrics
  plugin_licenses: yes
  plugin_licenses_setup: bash -c '[[ -f package.json ]] && npm ci || true'
  plugin_licenses_legal: no
  plugin_licenses_ratio: yes