doc(plugins/screenshot): update

This commit is contained in:
lowlighter
2022-01-15 20:18:01 -05:00
parent a077e5dba3
commit cb1c8d204e
2 changed files with 40 additions and 29 deletions

View File

@@ -1,16 +1,29 @@
### 📸 Website screenshot <!--header-->
The *screenshot* plugin lets you take a screenshot from any website.
It can be restricted with a [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors) or you can take a full page.
<table> <table>
<td align="center"> <tr><th colspan="2"><h3>📸 Website screenshot</h3></th></tr>
<img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.screenshot.svg"> <tr><td colspan="2" align="center"><p>This plugin display a screenshot from any website.
It can either the full page or a portion restricted by a <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors">CSS selector</a>.</p>
</td></tr>
<tr>
<th rowspan="3">Supported features<br><sub><a href="metadata.yml">→ Full specification</a></sub></th>
<td><a href="/source/templates/classic"><code>📗 Classic template</code></a> <a href="/source/templates/repository"><code>📘 Repository template</code></a> <a href="/source/templates/terminal"><code>📙 Terminal template</code></a></td>
</tr>
<tr>
<td><code>👤 Users</code> <code>👥 Organizations</code> <code>📓 Repositories</code></td>
</tr>
<tr>
<td><i>No tokens are required for this plugin</i></td>
</tr>
<tr>
<td colspan="2" align="center">
<img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.screenshot.svg" alt=""></img>
<img width="900" height="1" alt=""> <img width="900" height="1" alt="">
</td> </td>
</tr>
</table> </table>
<!--/header-->
#### ➡️ Available options ## ➡️ Available options
<!--options--> <!--options-->
<table> <table>
@@ -19,7 +32,7 @@ It can be restricted with a [CSS selector](https://developer.mozilla.org/en-US/d
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"><code>plugin_screenshot</code></td> <td nowrap="nowrap"><code>plugin_screenshot</code></td>
<td rowspan="2"><p>Display a screenshot of any website</p> <td rowspan="2"><p>Enable screenshot plugin</p>
<img width="900" height="1" alt=""></td> <img width="900" height="1" alt=""></td>
</tr> </tr>
<tr> <tr>
@@ -29,7 +42,7 @@ It can be restricted with a [CSS selector](https://developer.mozilla.org/en-US/d
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"><code>plugin_screenshot_title</code></td> <td nowrap="nowrap"><code>plugin_screenshot_title</code></td>
<td rowspan="2"><p>Screenshot title caption</p> <td rowspan="2"><p>Title caption</p>
<img width="900" height="1" alt=""></td> <img width="900" height="1" alt=""></td>
</tr> </tr>
<tr> <tr>
@@ -39,7 +52,7 @@ It can be restricted with a [CSS selector](https://developer.mozilla.org/en-US/d
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"><code>plugin_screenshot_url</code></td> <td nowrap="nowrap"><code>plugin_screenshot_url</code></td>
<td rowspan="2"><p>Website to take screenshot</p> <td rowspan="2"><p>Website url</p>
<img width="900" height="1" alt=""></td> <img width="900" height="1" alt=""></td>
</tr> </tr>
<tr> <tr>
@@ -48,7 +61,7 @@ It can be restricted with a [CSS selector](https://developer.mozilla.org/en-US/d
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"><code>plugin_screenshot_selector</code></td> <td nowrap="nowrap"><code>plugin_screenshot_selector</code></td>
<td rowspan="2"><p>Selector to take in screenshot</p> <td rowspan="2"><p>CSS Selector</p>
<img width="900" height="1" alt=""></td> <img width="900" height="1" alt=""></td>
</tr> </tr>
<tr> <tr>
@@ -58,7 +71,7 @@ It can be restricted with a [CSS selector](https://developer.mozilla.org/en-US/d
</tr> </tr>
<tr> <tr>
<td nowrap="nowrap"><code>plugin_screenshot_background</code></td> <td nowrap="nowrap"><code>plugin_screenshot_background</code></td>
<td rowspan="2"><p>Display or remove default page background</p> <td rowspan="2"><p>Display background</p>
<img width="900" height="1" alt=""></td> <img width="900" height="1" alt=""></td>
</tr> </tr>
<tr> <tr>
@@ -69,9 +82,7 @@ It can be restricted with a [CSS selector](https://developer.mozilla.org/en-US/d
</table> </table>
<!--/options--> <!--/options-->
*[→ Full specification](metadata.yml)* ## Examples workflows
#### Examples workflows
<!--examples--> <!--examples-->
```yaml ```yaml

View File

@@ -1,5 +1,10 @@
name: "📸 Website screenshot" name: "📸 Website screenshot"
category: community 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).
examples:
default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.screenshot.svg
authors: authors:
- lowlighter - lowlighter
supports: supports:
@@ -9,33 +14,28 @@ supports:
scopes: [] scopes: []
inputs: inputs:
# Enable or disable plugin
plugin_screenshot: plugin_screenshot:
description: Display a screenshot of any website description: Enable screenshot plugin
type: boolean type: boolean
default: no default: no
# Screenshot title caption
plugin_screenshot_title: plugin_screenshot_title:
description: Screenshot title caption description: Title caption
type: string type: string
default: Screenshot default: Screenshot
# Website to take screenshot
plugin_screenshot_url: plugin_screenshot_url:
description: Website to take screenshot description: Website url
type: string type: string
default: "" default: ""
example: https://metrics.lecoq.io example: https://metrics.lecoq.io
# Selector to take in screenshot
plugin_screenshot_selector: plugin_screenshot_selector:
description: Selector to take in screenshot description: CSS Selector
type: string type: string
default: body default: body
# Display or remove default page background
plugin_screenshot_background: plugin_screenshot_background:
description: Display or remove default page background description: Display background
type: boolean type: boolean
default: yes default: yes