Additional bonus of using pupeeter is that it can take screenshots, making it easy to convert SVGs to PNG output.
Additional bonus of using puppeteer is that it can take screenshots, making it easy to convert SVGs to PNG output.
### 💬 Gathering external data from GitHub APIs and Third-Party services
@ -70,7 +70,7 @@ Additional bonus of using pupeeter is that it can take screenshots, making it ea
As for other external services (Twitter, Spotify, PageSpeed, ...), metrics use their respective APIs, usually making https requests through [axios](https://github.com/axios/axios) and by following their documentation. It would be overkill to install entire SDKs for these since plugins rarely uses more than 2/3 calls.
In last resort, pupeeter is seldom used to scrap websites, though its use tends to make things slow and unstable (as it'll break upon HTML structural changes).
In last resort, puppeteer is seldom used to scrap websites, though its use tends to make things slow and unstable (as it'll break upon HTML structural changes).
@ -20,7 +20,7 @@ The following contributions are accepted:
<table>
<tr>
<th>Section</th>
<th>Editions</th>
<th>Changes</th>
<th>Additions</th>
<th>Notes</th>
</tr>
@ -41,7 +41,7 @@ The following contributions are accepted:
<td>❌</td>
<td>
<ul>
<li>Templates editions are allowed with new features additions (but must remain consistent with current visuals)</li>
<li>Template changes are allowed with new features additions (but must remain consistent with current visuals)</li>
<li>New templates should use <ahref="https://github.com/lowlighter/metrics/blob/master/source/templates/community/README.md">📕 Community templates</a> instead</li>
</ul>
</td>
@ -73,7 +73,7 @@ The following contributions are accepted:
<td>❌</td>
<td>
<ul>
<li>Core editions impact all rendering process and should be avoided unless necessary</li>
<li>Core changes impact all rendering process and should be avoided unless necessary</li>
<li>New dependencies should be avoided when possible</li>
<p>This option requires <ahref="/source/plugins/contributors/README.md#plugin_contributors_sections"><code>plugin_contributors_sections</code></a> to have <code>categories</code> in it to be effective.
Pass a JSON object mapping category with fileglobs</p>
Pass a JSON object mapping category with fileglobs</p>
<imgwidth="900"height="1"alt=""></td>
</tr>
<tr>
@ -130,9 +130,9 @@ Pass a JSON object mapping category with fileglobs</p>
## 🗂️ Setting up contribution categories
Pass a JSON object to `plugin_contributors_categories` with categories names as keys and arrays of fileglobs as values to configure contributions categories.
Pass a JSON object to `plugin_contributors_categories` with categories names as keys and arrays of fileglobs as values to configure contributions categories.
Each modified file by a contributor matching a fileglob will add them in said category.
Each modified file by a contributor matching a fileglob will add them in said category.
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
Pass a JSON object mapping category with fileglobs
Some presets are hosted on this repository on the [`@presets`](https://github.com/lowlighter/metrics/tree/presets) branch and can be used directly by using using their identifier prefixed by an arobase (`@`).
Some presets are hosted on this repository on the [`@presets`](https://github.com/lowlighter/metrics/tree/presets) branch and can be used directly by using their identifier prefixed by an arobase (`@`).
*Example: using a pre-defined configuration preset*
```yaml
@ -122,7 +122,7 @@ Additional JavaScript can be injected using `extras_js` option.
```
> ℹ️ JavaScript is executed in puppeteer context during the rendering phase, **not** in *metrics* context.
> It will be possible to access `document` and all other features accessibles like if the SVG was opened in a browser page
> It will be possible to access `document` and all other features accessible like if the SVG was opened in a browser page
> 💡 If you make an heavy use of this option, creating a [community templates](/source/templates/community/README.md) may be a better alternative
@ -304,7 +304,7 @@ metrics:
### Manual handling
Use `config_ouput: none` to perform custom processing with outputs.
Use `config_output: none` to perform custom processing with outputs.
They will be available under `/metrics_renders/{filename}` in the runner.
*Example: generate outputs and manually push them*
@ -336,7 +336,7 @@ metrics:
## ♻️ Retrying automatically failed rendering and output action
Rendering is subject to external factors and can fail ocassionaly.
Rendering is subject to external factors and can fail occasionally.
Use `retries` and `retries_delay` options to automatically retry rendering.
*Example: retry render up to 3 times (wait 5 minutes between each fail)*
@ -347,7 +347,7 @@ Use `retries` and `retries_delay` options to automatically retry rendering.
retries_delay: 300
```
Output action is also subject to GitHub API rate-limiting and overall health status and can fail ocassionaly.
Output action is also subject to GitHub API rate-limiting and overall health status and can fail occasionally.
Use `retries_output_action` and `retries_delay_output_action` options to automatically retry output action.
> 💡 As output action is a separate step from rendering, render step won't be called again
@ -362,7 +362,7 @@ Use `retries_output_action` and `retries_delay_output_action` options to automat
## 🗜️ Optimize SVG output
To reduce filesize and decrease loading time, *metrics* offers several optimization options, such as purging unused CSS and style minification, XML pretty-pretting (which also reduce diffs between changes) and general SVG optimation (still experimental).
To reduce filesize and decrease loading time, *metrics* offers several optimization options, such as purging unused CSS and style minification, XML pretty-printing (which also reduce diffs between changes) and general SVG optimization (still experimental).
> 💡 This option is enabled by default!
@ -525,9 +525,9 @@ When doing so, any settings which defaults on user fetched values will not be te
<li><code>none</code>: just create file in <code>/metrics_renders</code> directory of action runner</li>
<li><code>commit</code>: push output to <code>committer_branch</code></li>
<li><code>pull-request</code>: push output to a new branch and open a pull request to <code>committer_branch</code></li>
<li><code>pull-request-merge</code>: same as <code>pull-request</code> and additionaly merge pull request</li>
<li><code>pull-request-squash</code>: same as <code>pull-request</code> and additionaly squash and merge pull request</li>
<li><code>pull-request-rebase</code>: same as <code>pull-request</code> and additionaly rebase and merge pull request</li>
<li><code>pull-request-merge</code>: same as <code>pull-request</code> and additionally merge pull request</li>
<li><code>pull-request-squash</code>: same as <code>pull-request</code> and additionally squash and merge pull request</li>
<li><code>pull-request-rebase</code>: same as <code>pull-request</code> and additionally rebase and merge pull request</li>
<li><code>gist</code>: push output to <code>committer_gist</code></li>
</ul>
<blockquote>
@ -752,7 +752,7 @@ Size must be a supported icon size (12, 16 or 24).
@ -239,7 +239,7 @@ It will be automatically hidden if empty.</p>
The default algorithm use the top languages provided of each repository you contributed to.
When working in collaborative projects with a lot of people, these numbers may be less representative of your actual work.
The `plugin_languages_indepth` option lets you use a more advanced algorithm for more accurates statistics.
The `plugin_languages_indepth` option lets you use a more advanced algorithm for more accurate statistics.
Under the hood, it will clone your repositories, run [linguist-js](https://github.com/Nixinova/Linguist) (a JavaScript port of [GitHub linguist](https://github.com/github/linguist)) and iterate over patches matching your `commits_authoring` setting.
Since git lets you use any email and username for commits, *metrics* may not be able to detect a commit ownership if it isn't the same as your GitHub personal data. By default, it will use your GitHub username, but you can configure additional matching usernames and email addresses using `commits_authoring` option.
@ -326,7 +326,7 @@ It is possible to use custom colors using `plugin_languages_colors` option.
The following syntaxes are supported:
- A predefined set from [colorsets.json](colorsets.json) *(support limited to 8 languages max)*
- `${language}:${color}` to change the color of a language *(case insensitive)*
- `${n}:${color}` to change the color of the the n-th language
- `${n}:${color}` to change the color of the n-th language
Both hexadecimal and [named color](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value) are supported.
<li><code>top</code>: display top listened artists/tracks</li>
</ul>
<p>If <ahref="/source/plugins/music/README.md#plugin_music_playlist"><code>plugin_music_playlist</code></a> is specifed, the default value is <code>playlist</code>, else it is <code>recent</code></p>
<p>If <ahref="/source/plugins/music/README.md#plugin_music_playlist"><code>plugin_music_playlist</code></a> is specified, the default value is <code>playlist</code>, else it is <code>recent</code></p>
<imgwidth="900"height="1"alt=""></td>
</tr>
<tr>
@ -262,7 +262,7 @@ Extract the source link from the code pasted in your clipboard:
*(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](github.com/sponsors/lowlighter) and I could eventually invest in a developper account with enough money, implement it and also eventually offer service on the shared instance
> 😥 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](github.com/sponsors/lowlighter) 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`
<p>Can be configured to use alternate skyline websites different from <ahref="https://skyline.github.com">skyline.github.com</a>, such as <ahref="https://github.com/honzaap/GitHubCity">honzaap's GitHub City</a>.</p>
<p>Can be configured to use alternate skyline websites different from <ahref="https://skyline.github.com">skyline.github.com</a>, such as <ahref="https://github.com/honzaap/GithubCity">honzaap's GitHub City</a>.</p>
<ul>
<li><code>url</code>: Target URL (mandatory)</li>
<li><code>ready</code>: Readiness condition (A JS function that returns a boolean)</li>
Can be configured to use alternate skyline websites different from [skyline.github.com](https://skyline.github.com), such as [honzaap's GitHub City](https://github.com/honzaap/GitHubCity).
Can be configured to use alternate skyline websites different from [skyline.github.com](https://skyline.github.com), such as [honzaap's GitHub City](https://github.com/honzaap/GithubCity).
- `url`:Target URL (mandatory)
- `ready`:Readiness condition (A JS function that returns a boolean)
describe("Check files editions (checkout your files if needed)",()=>{
//File changes
describe("Check file changes (checkout your files if needed)",()=>{
describe("Auto-generated files were not modified",()=>
voidtest.each([
"README.md",
@ -42,7 +42,7 @@ describe("Check files editions (checkout your files if needed)", () => {
}
})
//Templates editions
describe("Check templates editions",()=>{
//Template changes
describe("Check template changes",()=>{
test("Use community templates instead (see https://github.com/lowlighter/metrics/tree/master/source/templates/community)",async()=>voidexpect((awaitdiff()).filter(edited=>/^sources[/]templates[/]/.test(edited)&&/^source[/]templates[/](?:classic|terminal|markdown|repository|community)[/][\s\S]*$/.test(edited)).length).toBe(0))