File: README.md
๐ Metrics [](https://www.producthunt.com/posts/github-metrics?utm_source=badge-featured&utm_medium=badge&utm_source=badge-github-metrics)
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 |
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/@mainbranches) which includes unreleased features planned for next release. See documentation for current released version v3.34 (@latestbranch) here.
๐ฆฎ Setup
There are several ways to setup metrics, each having its advantages and disadvantages:
- โ๏ธ Using GitHub Action on a profile repository (~10 min)
- โ๏ธ All features
- โ๏ธ High availability (no downtimes)
- โ Configuration can be a bit time-consuming
- ๐ Using the shared instance (~1 min)
- โ๏ธ Easily configurable and previewable
- โ Limited features (compute-intensive features are disabled)
- ๐๏ธ Deploying a web instance (~20 min)
- โ๏ธ Create another shared instance
- โ Requires some sysadmin knowledge
- ๐ณ Using command line with docker (~2 min)
- โ๏ธ Suited for one-time rendering
- ๐ง Local setup for development (~20 min)
Additional resources for setup:
- ๐ฆ Configure metrics for organizations
- ๐ Run metrics on self-hosted runners
- ๐งฐ Template/Plugin compatibility matrix
๐ผ๏ธ Templates
Templates lets you change general appearance of rendered metrics.
- ๐ Classic template
classic - ๐ Repository template
repository - ๐ Terminal template
terminal - ๐ Markdown template
markdown - ๐ Community templates
community
๐งฉ Plugins
Plugins provide additional content and lets you customize rendered metrics.
๐ฆ Maintained by core team
- Core plugins
- GitHub plugins
- ๐ Achievements
achievements - ๐ฐ Recent activity
activity - ๐ Commit calendar
calendar - โ Random code snippet
code - ๐
Repository contributors
contributors - ๐ฌ Discussions
discussions - ๐๏ธ Follow-up of issues and pull requests
followup - ๐ซ Gists
gists - ๐ก Coding habits and activity
habits - ๐ Introduction
introduction - ๐
Isometric commit calendar
isocalendar - ๐ท๏ธ Languages activity
languages - ๐ Repository licenses
licenses - ๐จโ๐ป Lines of code changed
lines - ๐ฉ Notable contributions
notable - ๐งโ๐คโ๐ง People
people - ๐๏ธ GitHub projects
projects - ๐ญ Comment reactions
reactions - ๐ Featured repositories
repositories - ๐ GitHub Skyline
skyline - ๐ GitHub Sponsors
sponsors - ๐ GitHub Sponsorships
sponsorships - โจ Stargazers
stargazers - ๐ซ Star lists
starlists - ๐ Recently starred repositories
stars - ๐ญ GitHub Community Support
supportโ ๏ธ deprecated - ๐ Starred topics
topics - ๐งฎ Repositories traffic
traffic
- ๐ Achievements
- Social plugins
- ๐ธ Anilist watch list and reading list
anilist - ๐ณ๏ธ Leetcode
leetcode - ๐ผ Music activity and suggestions
music - โฑ๏ธ Google PageSpeed
pagespeed - โ๏ธ Recent posts
posts - ๐ผ Rss feed
rss - ๐จ๏ธ Stack Overflow
stackoverflow - ๐น๏ธ Steam
steam - ๐ค Latest tweets
tweetsโ ๏ธ deprecated - โฐ WakaTime
wakatime
- ๐ธ Anilist watch list and reading list
๐ฒ Maintained by community
- Community plugins
- ๐ง 16personalities
16personalitiesby @lowlighter - โ๏ธ Chess
chessby @lowlighter - ๐ช Crypto
cryptoby @dajneem23 - ๐ฅ Fortune
fortuneby @lowlighter - ๐ Nightscout
nightscoutby @legoandmars - ๐ฉ PoopMap plugin
poopmapby @matievisthekat - ๐ธ Website screenshot
screenshotby @lowlighter - ๐ฆ Splatoon
splatoonby @lowlighter - ๐น Stock prices
stockby @lowlighter
- ๐ง 16personalities
๐ช Contributing
If you are interested in contributing, the following resources may interest you:
- ๐ช Contribution guide
- ๐งฌ Architecture
- ๐ License
- :octocat: GitHub resources
Use ๐ฌ discussions for feedback, new features suggestions, bugs reports or to request help for installation.
๐ License
MIT License
Copyright (c) 2020-present lowlighterFile: 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 countrelative: 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
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: percentageFile: 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
- uses: lowlighter/metrics@latest
with:
plugin_projects: yes
plugin_projects_repositories: lowlighter/metrics/projects/1โน๏ธ Examples workflows
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: yesFile: 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 |
Latest posts | |โก๏ธ Available options
| Option | Description |
|---|---|
plugin_posts |
Enable posts plugin |
type: boolean |
default: no | |
| plugin_posts_source | External source
dev.to: dev.tohashnode: 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
name: Recent posts
uses: lowlighter/metrics@latest
with:
filename: metrics.plugin.posts.svg
token: NOT_NEEDED
base: ""
plugin_posts: yes
plugin_posts_source: dev.toname: 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: yesFile: 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 |
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:
followersfollowing/followedsponsoring/sponsoredsponsorsmembers (organization only)thanks(to be configured with plugin_people_thanks)
Repositories support the following values:
sponsors (same as owner sponsors)contributorsstargazerswatchersthanks(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
name: Followers
uses: lowlighter/metrics@latest
with:
filename: metrics.plugin.people.followers.svg
token: ${{ secrets.METRICS_TOKEN }}
base: ""
plugin_people: yes
plugin_people_types: followersname: 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, sponsorsFile: 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 |
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
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.ioname: 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.ioname: 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.ioname: 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: yesFile: 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 |
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 filteringorganization: only organization accounts repositoriesuser: 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 madepull_request: a pull request was openedissue: 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
name: Contributions
uses: lowlighter/metrics@latest
with:
filename: metrics.plugin.notable.svg
token: ${{ secrets.METRICS_TOKEN }}
base: ""
plugin_notable: yesname: 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: yesFile: 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 |
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 Musicspotify: Spotifylastfm: Last.fmyoutube: 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 playlistrecent: display recently listened trackstop: 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 weeksmedium: 6 monthslong: several years |
| type: string
default: short
**allowed values:**shortmediumlong | |
| plugin_music_top_type | Top tracks - Display type
tracks: display trackartists: 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:
https://accounts.spotify.com/authorize?client_id=********&response_type=code&scope=user-read-recently-played%20user-top-read&redirect_uri=https%3A%2F%2FlocalhostWhen 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.
(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:
{
"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:
๐ 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:
โฏ๏ธ 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:
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
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: 2name: 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/3nfA87oeJw4LFVcUDjRcqiname: 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: 2name: 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: tracksname: 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: artistsname: 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_uxp9TUOl9zVdw77xith8o9AknVwz9Uname: 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: youtubename: 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: RJFile: 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 |
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 sectionrepositories will display repositories with the most lines added and removedhistory 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
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: 30name: 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/metricsFile: 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
- name: Licenses and permissions
with:
repo: metrics
plugin_licenses: yes
plugin_licenses_setup: npm ciDependencies 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
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'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