mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2025-10-25 15:19:23 +00:00
Compare commits
100 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d4b2c88e5 | ||
|
|
3acc90e47c | ||
|
|
88515b7d7f | ||
|
|
c5e11626b5 | ||
|
|
2ead177404 | ||
|
|
71f762f646 | ||
|
|
95bff47b85 | ||
|
|
de04619f88 | ||
|
|
ecdfdd4b85 | ||
|
|
a893a9601e | ||
|
|
ff7282ecb8 | ||
|
|
eb38f76a6a | ||
|
|
fc0b553a4a | ||
|
|
1a3249cdae | ||
|
|
43f9ae92ad | ||
|
|
e66d3aab2e | ||
|
|
d921ac6f02 | ||
|
|
5acd83a3ef | ||
|
|
397b742bec | ||
|
|
d30b08201d | ||
|
|
8da05bcc17 | ||
|
|
badcd642ec | ||
|
|
fde9ee04cf | ||
|
|
b6e0b2389a | ||
|
|
3f5e8aabf5 | ||
|
|
ead874e6b2 | ||
|
|
e13410861d | ||
|
|
bf3b91a535 | ||
|
|
72704529c5 | ||
|
|
b21e07ea94 | ||
|
|
703d653ec5 | ||
|
|
71631b248a | ||
|
|
63c22575ea | ||
|
|
9cc888e5ad | ||
|
|
d5b4621233 | ||
|
|
cee97821d6 | ||
|
|
55c763a5c2 | ||
|
|
d03c10623c | ||
|
|
5a52c1f277 | ||
|
|
544e6a92df | ||
|
|
a94bc15746 | ||
|
|
e7ce6a69b7 | ||
|
|
7cf7e84dd8 | ||
|
|
6f1f29967d | ||
|
|
006da0f9ea | ||
|
|
c62f79eded | ||
|
|
1d19079913 | ||
|
|
44300c871f | ||
|
|
989c0b9904 | ||
|
|
cb52eb63ce | ||
|
|
7397169a27 | ||
|
|
ffdb47d77f | ||
|
|
383bee0e3e | ||
|
|
4d6541dd14 | ||
|
|
b1e0896a0d | ||
|
|
e07ccd9f66 | ||
|
|
250b1f4c9c | ||
|
|
023c77ff09 | ||
|
|
dc402220f2 | ||
|
|
c448d0d5f6 | ||
|
|
3da367f29f | ||
|
|
ead7115cbe | ||
|
|
1fd028942f | ||
|
|
4219bbbf61 | ||
|
|
29a43686d4 | ||
|
|
63b940cf0e | ||
|
|
bbf58ee814 | ||
|
|
e2a674815d | ||
|
|
343b98944d | ||
|
|
2bbb7c1ab6 | ||
|
|
5296e56b1c | ||
|
|
943c045fab | ||
|
|
2af3f7faeb | ||
|
|
ed9e198d60 | ||
|
|
3bee7212b7 | ||
|
|
c82d8c4523 | ||
|
|
bef21e8a21 | ||
|
|
037e109699 | ||
|
|
f7befacd79 | ||
|
|
cec5fb4595 | ||
|
|
9c86391fb6 | ||
|
|
a3dcb31729 | ||
|
|
1002c6fe27 | ||
|
|
c64797d681 | ||
|
|
131b37fff8 | ||
|
|
813a53cdfa | ||
|
|
2af901a814 | ||
|
|
83afa97017 | ||
|
|
e0ded712e8 | ||
|
|
d484e832f5 | ||
|
|
71a5d83067 | ||
|
|
35ce60b596 | ||
|
|
0ec70a44db | ||
|
|
1ee2653cf8 | ||
|
|
4c0178cf9a | ||
|
|
296bc61837 | ||
|
|
766ccb1f1b | ||
|
|
f7314dc2e8 | ||
|
|
f453890d13 | ||
|
|
2c8f459806 |
@@ -2,7 +2,7 @@ root = true
|
|||||||
|
|
||||||
[*]
|
[*]
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
end_of_line = CRLF
|
end_of_line = LF
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
insert_final_newline = false
|
insert_final_newline = false
|
||||||
@@ -26,9 +26,6 @@ indent_size = 2
|
|||||||
[*.md]
|
[*.md]
|
||||||
trim_trailing_whitespace = false
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
[*.sh]
|
|
||||||
end_of_line = lf
|
|
||||||
|
|
||||||
[*.cs]
|
[*.cs]
|
||||||
# Prefer file scoped namespace declarations
|
# Prefer file scoped namespace declarations
|
||||||
csharp_style_namespace_declarations = file_scoped:warning
|
csharp_style_namespace_declarations = file_scoped:warning
|
||||||
|
|||||||
@@ -1,2 +1,5 @@
|
|||||||
# Use file scoped namespace declarations
|
# Use file scoped namespace declarations
|
||||||
7b2da0a4f63bf3ceab99d2c88535e74155f2b99c
|
7b2da0a4f63bf3ceab99d2c88535e74155f2b99c
|
||||||
|
|
||||||
|
# fix line-endings
|
||||||
|
e2ad4b1ea5555e701cda4fd400bb6592e318e1ff
|
||||||
|
|||||||
4
.gitattributes
vendored
Normal file
4
.gitattributes
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
* text=auto
|
||||||
|
|
||||||
|
*.cs text eol=lf
|
||||||
|
*.md text eol=lf
|
||||||
3
.github/ISSUE_TEMPLATE/bug_report.md
vendored
3
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -26,3 +26,6 @@ If applicable, add screenshots to help explain your problem.
|
|||||||
|
|
||||||
**Additional context**
|
**Additional context**
|
||||||
Add any other context about the problem here.
|
Add any other context about the problem here.
|
||||||
|
|
||||||
|
---
|
||||||
|
Please upvote :+1: this issue if you are interested in it.
|
||||||
3
.github/ISSUE_TEMPLATE/feature_request.md
vendored
3
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -18,3 +18,6 @@ A clear and concise description of any alternative solutions or features you've
|
|||||||
|
|
||||||
**Additional context**
|
**Additional context**
|
||||||
Add any other context or screenshots about the feature request here.
|
Add any other context or screenshots about the feature request here.
|
||||||
|
|
||||||
|
---
|
||||||
|
Please upvote :+1: this issue if you are interested in it.
|
||||||
22
.github/pull_request_template.md
vendored
Normal file
22
.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<!--
|
||||||
|
Do NOT open a PR without discussing the changes on an open issue, first.
|
||||||
|
|
||||||
|
Add the issue number here. e.g. #123
|
||||||
|
-->
|
||||||
|
fixes #
|
||||||
|
|
||||||
|
<!-- formalities. These are not optional. -->
|
||||||
|
|
||||||
|
- [ ] I have read the [Contribution Guidelines](https://github.com/spectreconsole/spectre.console/blob/main/CONTRIBUTING.md)
|
||||||
|
- [ ] I have commented on the issue above and discussed the intended changes
|
||||||
|
- [ ] A maintainer has signed off on the changes and the issue was assigned to me
|
||||||
|
- [ ] All newly added code is adequately covered by tests
|
||||||
|
- [ ] All existing tests are still running without errors
|
||||||
|
- [ ] The documentation was modified to reflect the changes _OR_ no documentation changes are required.
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
<!-- describe the changes you made. -->
|
||||||
|
|
||||||
|
---
|
||||||
|
Please upvote :+1: this pull request if you are interested in it.
|
||||||
65
.github/workflows/ci.yaml
vendored
65
.github/workflows/ci.yaml
vendored
@@ -8,48 +8,6 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
###################################################
|
|
||||||
# DOCS
|
|
||||||
###################################################
|
|
||||||
|
|
||||||
docs:
|
|
||||||
name: Documentation
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@master
|
|
||||||
|
|
||||||
- name: Setup .NET SDK
|
|
||||||
uses: actions/setup-dotnet@v3
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: '16'
|
|
||||||
|
|
||||||
- name: Cache dependencies
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ~/.npm
|
|
||||||
key: npm-${{ hashFiles('package-lock.json') }}
|
|
||||||
restore-keys: npm-
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
cd docs
|
|
||||||
dotnet tool restore
|
|
||||||
dotnet run --configuration Release
|
|
||||||
|
|
||||||
- name: Archive doc generation
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: documentation-output
|
|
||||||
path: docs/output/
|
|
||||||
retention-days: 5
|
|
||||||
|
|
||||||
###################################################
|
###################################################
|
||||||
# BUILD
|
# BUILD
|
||||||
###################################################
|
###################################################
|
||||||
@@ -57,25 +15,20 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
if: "!contains(github.event.head_commit.message, 'skip-ci')"
|
if: "!contains(github.event.head_commit.message, 'skip-ci')"
|
||||||
strategy:
|
runs-on: ubuntu-latest
|
||||||
matrix:
|
|
||||||
kind: ['linux', 'windows', 'macOS']
|
|
||||||
include:
|
|
||||||
- kind: linux
|
|
||||||
os: ubuntu-latest
|
|
||||||
- kind: windows
|
|
||||||
os: windows-latest
|
|
||||||
- kind: macOS
|
|
||||||
os: macos-latest
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup .NET SDK
|
- name: Setup .NET SDK
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: |
|
||||||
|
6.0.x
|
||||||
|
7.0.x
|
||||||
|
8.0.x
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -85,7 +38,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload Verify Test Results
|
- name: Upload Verify Test Results
|
||||||
if: failure()
|
if: failure()
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: verify-test-results
|
name: verify-test-results
|
||||||
path: |
|
path: |
|
||||||
|
|||||||
72
.github/workflows/publish.yaml
vendored
72
.github/workflows/publish.yaml
vendored
@@ -15,40 +15,34 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
###################################################
|
###################################################
|
||||||
# BUILD
|
# PUBLISH
|
||||||
###################################################
|
###################################################
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Publish NuGet Packages
|
||||||
if: |
|
if: "!contains(github.event.head_commit.message, 'skip-ci') || startsWith(github.ref, 'refs/tags/')"
|
||||||
(!startsWith(github.event.head_commit.message, 'skip-ci')
|
runs-on: ubuntu-latest
|
||||||
&& !startsWith(github.event.head_commit.message, 'chore:'))
|
|
||||||
|| startsWith(github.ref, 'refs/tags/')
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
kind: ['linux', 'windows', 'macOS']
|
|
||||||
include:
|
|
||||||
- kind: linux
|
|
||||||
os: ubuntu-latest
|
|
||||||
- kind: windows
|
|
||||||
os: windows-latest
|
|
||||||
- kind: macOS
|
|
||||||
os: macos-latest
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup .NET SDK
|
- name: Setup .NET SDK
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: |
|
||||||
|
6.0.x
|
||||||
|
7.0.x
|
||||||
|
8.0.x
|
||||||
|
|
||||||
- name: Build
|
- name: Publish
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
dotnet tool restore
|
dotnet tool restore
|
||||||
dotnet cake
|
dotnet cake --target="publish" \
|
||||||
|
--nuget-key="${{secrets.NUGET_API_KEY}}" \
|
||||||
|
--github-key="${{secrets.GITHUB_TOKEN}}"
|
||||||
|
|
||||||
###################################################
|
###################################################
|
||||||
# DOCS
|
# DOCS
|
||||||
@@ -60,20 +54,20 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup .NET SDK
|
- name: Setup .NET SDK
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v4
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '16'
|
node-version: '16'
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: npm-${{ hashFiles('package-lock.json') }}
|
key: npm-${{ hashFiles('package-lock.json') }}
|
||||||
@@ -88,30 +82,4 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd docs
|
cd docs
|
||||||
dotnet tool restore
|
dotnet tool restore
|
||||||
dotnet run --configuration Release -- deploy
|
dotnet run --configuration Release -- deploy
|
||||||
|
|
||||||
###################################################
|
|
||||||
# PUBLISH
|
|
||||||
###################################################
|
|
||||||
|
|
||||||
publish:
|
|
||||||
name: Publish NuGet Packages
|
|
||||||
needs: [build]
|
|
||||||
if: "!contains(github.event.head_commit.message, 'skip-ci') || startsWith(github.ref, 'refs/tags/')"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup .NET SDK
|
|
||||||
uses: actions/setup-dotnet@v3
|
|
||||||
|
|
||||||
- name: Publish
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
dotnet tool restore
|
|
||||||
dotnet cake --target="publish" \
|
|
||||||
--nuget-key="${{secrets.NUGET_API_KEY}}" \
|
|
||||||
--github-key="${{secrets.GITHUB_TOKEN}}"
|
|
||||||
24
.github/workflows/top-issues-dashboard.yml
vendored
Normal file
24
.github/workflows/top-issues-dashboard.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: Top issues action.
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 */1 * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ShowAndLabelTopIssues:
|
||||||
|
name: Display and label top issues.
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Top Issues action
|
||||||
|
uses: rickstaa/top-issues-action@v1.3.99
|
||||||
|
env:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
top_list_size: 10
|
||||||
|
label: true
|
||||||
|
dashboard: true
|
||||||
|
dashboard_show_total_reactions: true
|
||||||
|
top_issues: true
|
||||||
|
top_bugs: true
|
||||||
|
top_features: true
|
||||||
|
feature_label: feature
|
||||||
|
top_pull_requests: true
|
||||||
23
README.md
23
README.md
@@ -3,8 +3,7 @@
|
|||||||
_[](https://www.nuget.org/packages/spectre.console)_ _[](https://www.nuget.org/packages/spectre.console.cli)_ [](https://app.netlify.com/sites/spectreconsole/deploys)
|
_[](https://www.nuget.org/packages/spectre.console)_ _[](https://www.nuget.org/packages/spectre.console.cli)_ [](https://app.netlify.com/sites/spectreconsole/deploys)
|
||||||
|
|
||||||
A .NET library that makes it easier to create beautiful, cross platform, console applications.
|
A .NET library that makes it easier to create beautiful, cross platform, console applications.
|
||||||
It is heavily inspired by the excellent [Rich library](https://github.com/willmcgugan/rich)
|
It is heavily inspired by the excellent Python library, [Rich](https://github.com/willmcgugan/rich). Detailed instructions for using `Spectre.Console` are located on the project website, https://spectreconsole.net
|
||||||
for Python. For detailed usage instructions, [please refer to the documentation at https://spectreconsole.net/.](https://spectreconsole.net/)
|
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
@@ -19,18 +18,22 @@ for Python. For detailed usage instructions, [please refer to the documentation
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* Written with unit testing in mind.
|
* Supports tables, grids, panels, and a [Rich](https://github.com/willmcgugan/rich) inspired markup language.
|
||||||
* Supports tables, grids, panels, and a [rich](https://github.com/willmcgugan/rich) inspired markup language.
|
|
||||||
* Supports the most common SRG parameters when it comes to text
|
* Supports the most common SRG parameters when it comes to text
|
||||||
styling such as bold, dim, italic, underline, strikethrough,
|
styling such as bold, dim, italic, underline, strikethrough,
|
||||||
and blinking text.
|
and blinking text.
|
||||||
* Supports 3/4/8/24-bit colors in the terminal.
|
* Supports 3/4/8/24-bit colors in the terminal.
|
||||||
The library will detect the capabilities of the current terminal
|
The library will detect the capabilities of the current terminal
|
||||||
and downgrade colors as needed.
|
and downgrade colors as needed.
|
||||||
|
* Written with unit testing in mind.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## Important Notices
|
||||||
|
|
||||||
|
> [!IMPORTANT]\
|
||||||
|
> We use the [Top Issues Dashboard](https://github.com/spectreconsole/spectre.console/issues/1517) for tracking community demand. Please upvote :+1: the issues and pull requests you are interested in.
|
||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
|
|
||||||
The fastest way of getting started using `Spectre.Console` is to install the NuGet package.
|
The fastest way of getting started using `Spectre.Console` is to install the NuGet package.
|
||||||
@@ -42,7 +45,7 @@ dotnet add package Spectre.Console
|
|||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
The documentation for `Spectre.Console` can be found at
|
The documentation for `Spectre.Console` can be found at
|
||||||
https://spectreconsole.net/
|
https://spectreconsole.net
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
@@ -69,7 +72,7 @@ And to run an example:
|
|||||||
## Sponsors
|
## Sponsors
|
||||||
|
|
||||||
The following people are [sponsoring](https://github.com/sponsors/patriksvensson)
|
The following people are [sponsoring](https://github.com/sponsors/patriksvensson)
|
||||||
Spectre.Console to show their support and to ensure the longevity of the project.
|
`Spectre.Console` to show their support and to ensure the longevity of the project.
|
||||||
|
|
||||||
* [Rodney Littles II](https://github.com/RLittlesII)
|
* [Rodney Littles II](https://github.com/RLittlesII)
|
||||||
* [Martin Björkström](https://github.com/bjorkstromm)
|
* [Martin Björkström](https://github.com/bjorkstromm)
|
||||||
@@ -99,6 +102,6 @@ This project is supported by the [.NET Foundation](https://dotnetfoundation.org)
|
|||||||
|
|
||||||
Copyright © Patrik Svensson, Phil Scott, Nils Andresen
|
Copyright © Patrik Svensson, Phil Scott, Nils Andresen
|
||||||
|
|
||||||
Spectre.Console is provided as-is under the MIT license. For more information see LICENSE.
|
`Spectre.Console` is provided as-is under the MIT license. For more information see LICENSE.
|
||||||
|
|
||||||
* SixLabors.ImageSharp, a library which Spectre.Console relies upon, is licensed under Apache 2.0 when distributed as part of Spectre.Console. The Six Labors Split License covers all other usage, see: https://github.com/SixLabors/ImageSharp/blob/master/LICENSE
|
* SixLabors.ImageSharp, a library which `Spectre.Console` relies upon, is licensed under Apache 2.0 when distributed as part of `Spectre.Console`. The Six Labors Split License covers all other usage, see: https://github.com/SixLabors/ImageSharp/blob/master/LICENSE
|
||||||
|
|||||||
60
build.cake
60
build.cake
@@ -14,8 +14,21 @@ Task("Build")
|
|||||||
.IsDependentOn("Clean")
|
.IsDependentOn("Clean")
|
||||||
.Does(context =>
|
.Does(context =>
|
||||||
{
|
{
|
||||||
|
Information("Compiling generator...");
|
||||||
|
DotNetBuild("./resources/scripts/Generator/Generator.sln", new DotNetBuildSettings {
|
||||||
|
Configuration = configuration,
|
||||||
|
Verbosity = DotNetVerbosity.Minimal,
|
||||||
|
NoLogo = true,
|
||||||
|
NoIncremental = context.HasArgument("rebuild"),
|
||||||
|
MSBuildSettings = new DotNetMSBuildSettings()
|
||||||
|
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
|
||||||
|
});
|
||||||
|
|
||||||
|
Information("\nCompiling Spectre.Console...");
|
||||||
DotNetBuild("./src/Spectre.Console.sln", new DotNetBuildSettings {
|
DotNetBuild("./src/Spectre.Console.sln", new DotNetBuildSettings {
|
||||||
Configuration = configuration,
|
Configuration = configuration,
|
||||||
|
Verbosity = DotNetVerbosity.Minimal,
|
||||||
|
NoLogo = true,
|
||||||
NoIncremental = context.HasArgument("rebuild"),
|
NoIncremental = context.HasArgument("rebuild"),
|
||||||
MSBuildSettings = new DotNetMSBuildSettings()
|
MSBuildSettings = new DotNetMSBuildSettings()
|
||||||
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
|
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
|
||||||
@@ -28,6 +41,8 @@ Task("Build-Analyzer")
|
|||||||
{
|
{
|
||||||
DotNetBuild("./src/Spectre.Console.Analyzer.sln", new DotNetBuildSettings {
|
DotNetBuild("./src/Spectre.Console.Analyzer.sln", new DotNetBuildSettings {
|
||||||
Configuration = configuration,
|
Configuration = configuration,
|
||||||
|
Verbosity = DotNetVerbosity.Minimal,
|
||||||
|
NoLogo = true,
|
||||||
NoIncremental = context.HasArgument("rebuild"),
|
NoIncremental = context.HasArgument("rebuild"),
|
||||||
MSBuildSettings = new DotNetMSBuildSettings()
|
MSBuildSettings = new DotNetMSBuildSettings()
|
||||||
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
|
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
|
||||||
@@ -40,6 +55,8 @@ Task("Build-Examples")
|
|||||||
{
|
{
|
||||||
DotNetBuild("./examples/Examples.sln", new DotNetBuildSettings {
|
DotNetBuild("./examples/Examples.sln", new DotNetBuildSettings {
|
||||||
Configuration = configuration,
|
Configuration = configuration,
|
||||||
|
Verbosity = DotNetVerbosity.Minimal,
|
||||||
|
NoLogo = true,
|
||||||
NoIncremental = context.HasArgument("rebuild"),
|
NoIncremental = context.HasArgument("rebuild"),
|
||||||
MSBuildSettings = new DotNetMSBuildSettings()
|
MSBuildSettings = new DotNetMSBuildSettings()
|
||||||
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
|
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
|
||||||
@@ -54,18 +71,24 @@ Task("Test")
|
|||||||
{
|
{
|
||||||
DotNetTest("./test/Spectre.Console.Tests/Spectre.Console.Tests.csproj", new DotNetTestSettings {
|
DotNetTest("./test/Spectre.Console.Tests/Spectre.Console.Tests.csproj", new DotNetTestSettings {
|
||||||
Configuration = configuration,
|
Configuration = configuration,
|
||||||
|
Verbosity = DotNetVerbosity.Minimal,
|
||||||
|
NoLogo = true,
|
||||||
NoRestore = true,
|
NoRestore = true,
|
||||||
NoBuild = true,
|
NoBuild = true,
|
||||||
});
|
});
|
||||||
|
|
||||||
DotNetTest("./test/Spectre.Console.Cli.Tests/Spectre.Console.Cli.Tests.csproj", new DotNetTestSettings {
|
DotNetTest("./test/Spectre.Console.Cli.Tests/Spectre.Console.Cli.Tests.csproj", new DotNetTestSettings {
|
||||||
Configuration = configuration,
|
Configuration = configuration,
|
||||||
|
Verbosity = DotNetVerbosity.Minimal,
|
||||||
|
NoLogo = true,
|
||||||
NoRestore = true,
|
NoRestore = true,
|
||||||
NoBuild = true,
|
NoBuild = true,
|
||||||
});
|
});
|
||||||
|
|
||||||
DotNetTest("./test/Spectre.Console.Analyzer.Tests/Spectre.Console.Analyzer.Tests.csproj", new DotNetTestSettings {
|
DotNetTest("./test/Spectre.Console.Analyzer.Tests/Spectre.Console.Analyzer.Tests.csproj", new DotNetTestSettings {
|
||||||
Configuration = configuration,
|
Configuration = configuration,
|
||||||
|
Verbosity = DotNetVerbosity.Minimal,
|
||||||
|
NoLogo = true,
|
||||||
NoRestore = true,
|
NoRestore = true,
|
||||||
NoBuild = true,
|
NoBuild = true,
|
||||||
});
|
});
|
||||||
@@ -77,6 +100,8 @@ Task("Package")
|
|||||||
{
|
{
|
||||||
context.DotNetPack($"./src/Spectre.Console.sln", new DotNetPackSettings {
|
context.DotNetPack($"./src/Spectre.Console.sln", new DotNetPackSettings {
|
||||||
Configuration = configuration,
|
Configuration = configuration,
|
||||||
|
Verbosity = DotNetVerbosity.Minimal,
|
||||||
|
NoLogo = true,
|
||||||
NoRestore = true,
|
NoRestore = true,
|
||||||
NoBuild = true,
|
NoBuild = true,
|
||||||
OutputDirectory = "./.artifacts",
|
OutputDirectory = "./.artifacts",
|
||||||
@@ -86,6 +111,8 @@ Task("Package")
|
|||||||
|
|
||||||
context.DotNetPack($"./src/Spectre.Console.Analyzer.sln", new DotNetPackSettings {
|
context.DotNetPack($"./src/Spectre.Console.Analyzer.sln", new DotNetPackSettings {
|
||||||
Configuration = configuration,
|
Configuration = configuration,
|
||||||
|
Verbosity = DotNetVerbosity.Minimal,
|
||||||
|
NoLogo = true,
|
||||||
NoRestore = true,
|
NoRestore = true,
|
||||||
NoBuild = true,
|
NoBuild = true,
|
||||||
OutputDirectory = "./.artifacts",
|
OutputDirectory = "./.artifacts",
|
||||||
@@ -94,38 +121,6 @@ Task("Package")
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("Publish-GitHub")
|
|
||||||
.WithCriteria(ctx => BuildSystem.IsRunningOnGitHubActions, "Not running on GitHub Actions")
|
|
||||||
.IsDependentOn("Package")
|
|
||||||
.Does(context =>
|
|
||||||
{
|
|
||||||
var apiKey = Argument<string>("github-key", null);
|
|
||||||
if(string.IsNullOrWhiteSpace(apiKey)) {
|
|
||||||
throw new CakeException("No GitHub API key was provided.");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Publish to GitHub Packages
|
|
||||||
var exitCode = 0;
|
|
||||||
foreach(var file in context.GetFiles("./.artifacts/*.nupkg"))
|
|
||||||
{
|
|
||||||
context.Information("Publishing {0}...", file.GetFilename().FullPath);
|
|
||||||
exitCode += StartProcess("dotnet",
|
|
||||||
new ProcessSettings {
|
|
||||||
Arguments = new ProcessArgumentBuilder()
|
|
||||||
.Append("gpr")
|
|
||||||
.Append("push")
|
|
||||||
.AppendQuoted(file.FullPath)
|
|
||||||
.AppendSwitchSecret("-k", " ", apiKey)
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(exitCode != 0)
|
|
||||||
{
|
|
||||||
throw new CakeException("Could not push GitHub packages.");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Task("Publish-NuGet")
|
Task("Publish-NuGet")
|
||||||
.WithCriteria(ctx => BuildSystem.IsRunningOnGitHubActions, "Not running on GitHub Actions")
|
.WithCriteria(ctx => BuildSystem.IsRunningOnGitHubActions, "Not running on GitHub Actions")
|
||||||
.IsDependentOn("Package")
|
.IsDependentOn("Package")
|
||||||
@@ -152,7 +147,6 @@ Task("Publish-NuGet")
|
|||||||
// Targets
|
// Targets
|
||||||
|
|
||||||
Task("Publish")
|
Task("Publish")
|
||||||
.IsDependentOn("Publish-GitHub")
|
|
||||||
.IsDependentOn("Publish-NuGet");
|
.IsDependentOn("Publish-NuGet");
|
||||||
|
|
||||||
Task("Default")
|
Task("Default")
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
|
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
|
||||||
<DefaultItemExcludes>$(DefaultItemExcludes);output\**;.gitignore</DefaultItemExcludes>
|
<DefaultItemExcludes>$(DefaultItemExcludes);output\**;.gitignore</DefaultItemExcludes>
|
||||||
<NoWarn>MVC1000</NoWarn>
|
<NoWarn>MVC1000</NoWarn>
|
||||||
|
|||||||
154
docs/Program.cs
154
docs/Program.cs
@@ -1,77 +1,77 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Docs.Extensions;
|
using Docs.Extensions;
|
||||||
using Docs.Shortcodes;
|
using Docs.Shortcodes;
|
||||||
using Docs.Utilities;
|
using Docs.Utilities;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Statiq.App;
|
using Statiq.App;
|
||||||
using Statiq.Common;
|
using Statiq.Common;
|
||||||
using Statiq.Core;
|
using Statiq.Core;
|
||||||
using Statiq.Web;
|
using Statiq.Web;
|
||||||
|
|
||||||
namespace Docs
|
namespace Docs
|
||||||
{
|
{
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static async Task<int> Main(string[] args) =>
|
public static async Task<int> Main(string[] args) =>
|
||||||
await Bootstrapper.Factory
|
await Bootstrapper.Factory
|
||||||
.CreateWeb(args)
|
.CreateWeb(args)
|
||||||
.AddSetting(Keys.Host, "spectreconsole.net")
|
.AddSetting(Keys.Host, "spectreconsole.net")
|
||||||
.AddSetting(Keys.LinksUseHttps, true)
|
.AddSetting(Keys.LinksUseHttps, true)
|
||||||
.AddSetting(Constants.EditLink, ConfigureEditLink())
|
.AddSetting(Constants.EditLink, ConfigureEditLink())
|
||||||
.AddSetting(Constants.SourceFiles, new List<string>
|
.AddSetting(Constants.SourceFiles, new List<string>
|
||||||
{
|
{
|
||||||
"../../src/Spectre.Console/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs",
|
"../../src/Spectre.Console/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs",
|
||||||
"../../src/Spectre.Console.Cli/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs",
|
"../../src/Spectre.Console.Cli/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs",
|
||||||
"../../src/Spectre.Console.ImageSharp/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs",
|
"../../src/Spectre.Console.ImageSharp/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs",
|
||||||
"../../src/Spectre.Console.Json/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs"
|
"../../src/Spectre.Console.Json/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs"
|
||||||
})
|
})
|
||||||
.AddSetting(Constants.ExampleSourceFiles, new List<string>
|
.AddSetting(Constants.ExampleSourceFiles, new List<string>
|
||||||
{
|
{
|
||||||
"../../examples/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs",
|
"../../examples/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.ConfigureServices(i =>
|
.ConfigureServices(i =>
|
||||||
{
|
{
|
||||||
i.AddSingleton(new TypeNameLinks());
|
i.AddSingleton(new TypeNameLinks());
|
||||||
})
|
})
|
||||||
.ConfigureSite("spectreconsole", "spectre.console", "main")
|
.ConfigureSite("spectreconsole", "spectre.console", "main")
|
||||||
.AddShortcode("Children", typeof(ChildrenShortcode))
|
.AddShortcode("Children", typeof(ChildrenShortcode))
|
||||||
.AddShortcode("ColorTable", typeof(ColorTableShortcode))
|
.AddShortcode("ColorTable", typeof(ColorTableShortcode))
|
||||||
.AddShortcode("EmojiTable", typeof(EmojiTableShortcode))
|
.AddShortcode("EmojiTable", typeof(EmojiTableShortcode))
|
||||||
.AddShortcode("Alert", typeof(AlertShortcode))
|
.AddShortcode("Alert", typeof(AlertShortcode))
|
||||||
.AddShortcode("Info", typeof(InfoShortcode))
|
.AddShortcode("Info", typeof(InfoShortcode))
|
||||||
.AddShortcode("AsciiCast", typeof(AsciiCastShortcode))
|
.AddShortcode("AsciiCast", typeof(AsciiCastShortcode))
|
||||||
.AddShortcode("Example", typeof(ExampleSnippet))
|
.AddShortcode("Example", typeof(ExampleSnippet))
|
||||||
.AddPipelines()
|
.AddPipelines()
|
||||||
.BuildPipeline(
|
.BuildPipeline(
|
||||||
"Bootstrap",
|
"Bootstrap",
|
||||||
builder => builder
|
builder => builder
|
||||||
.WithInputReadFiles("../node_modules/asciinema-player/dist/bundle/asciinema-player.js")
|
.WithInputReadFiles("../node_modules/asciinema-player/dist/bundle/asciinema-player.js")
|
||||||
.WithProcessModules(new SetDestination(Config.FromDocument(doc => new NormalizedPath($"./assets/{doc.Source.FileName}")), true))
|
.WithProcessModules(new SetDestination(Config.FromDocument(doc => new NormalizedPath($"./assets/{doc.Source.FileName}")), true))
|
||||||
.WithOutputWriteFiles()
|
.WithOutputWriteFiles()
|
||||||
)
|
)
|
||||||
.AddProcess(ProcessTiming.Initialization, _ => new ProcessLauncher("npm", "install --audit false --fund false --progress false")
|
.AddProcess(ProcessTiming.Initialization, _ => new ProcessLauncher("npm", "install --audit false --fund false --progress false")
|
||||||
{
|
{
|
||||||
LogErrors = false
|
LogErrors = false
|
||||||
})
|
})
|
||||||
.AddProcess(ProcessTiming.Initialization, _ => new ProcessLauncher("dotnet", "playwright install chromium"))
|
.AddProcess(ProcessTiming.Initialization, _ => new ProcessLauncher("dotnet", "playwright install chromium"))
|
||||||
.AddProcess(ProcessTiming.BeforeDeployment, _ => new ProcessLauncher("npm", "run build:tailwind")
|
.AddProcess(ProcessTiming.BeforeDeployment, _ => new ProcessLauncher("npm", "run build:tailwind")
|
||||||
{
|
{
|
||||||
LogErrors = false
|
LogErrors = false
|
||||||
})
|
})
|
||||||
.RunAsync();
|
.RunAsync();
|
||||||
|
|
||||||
private static Config<string> ConfigureEditLink()
|
private static Config<string> ConfigureEditLink()
|
||||||
{
|
{
|
||||||
return Config.FromDocument((doc, ctx) =>
|
return Config.FromDocument((doc, ctx) =>
|
||||||
{
|
{
|
||||||
return string.Format("https://github.com/{0}/{1}/edit/{2}/docs/input/{3}",
|
return string.Format("https://github.com/{0}/{1}/edit/{2}/docs/input/{3}",
|
||||||
ctx.GetString(Constants.Site.Owner),
|
ctx.GetString(Constants.Site.Owner),
|
||||||
ctx.GetString(Constants.Site.Repository),
|
ctx.GetString(Constants.Site.Repository),
|
||||||
ctx.GetString(Constants.Site.Branch),
|
ctx.GetString(Constants.Site.Branch),
|
||||||
doc.Source.GetRelativeInputPath());
|
doc.Source.GetRelativeInputPath());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "7.0.100",
|
"version": "8.0.100",
|
||||||
"rollForward": "latestFeature"
|
"rollForward": "latestFeature"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Description: "*Spectre.Console* makes it easy to write text with different style
|
|||||||
Highlights:
|
Highlights:
|
||||||
- Bold, Italic, Underline, strikethrough
|
- Bold, Italic, Underline, strikethrough
|
||||||
- Dim, Invert
|
- Dim, Invert
|
||||||
- Conceal, slowblink, rapidblink
|
- Conceal, slowblink, rapidblink
|
||||||
- Links
|
- Links
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -46,9 +46,9 @@ Note that what styles that can be used is defined by the system or your terminal
|
|||||||
<tr>
|
<tr>
|
||||||
<td><code>strikethrough</code></td>
|
<td><code>strikethrough</code></td>
|
||||||
<td>Shows text with a horizontal line through the center</td>
|
<td>Shows text with a horizontal line through the center</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>link</link></td>
|
<td><code>link</link></td>
|
||||||
<td>Creates a clickable link within text</td>
|
<td>Creates a clickable link within text</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
{"version": 2, "width": 122, "height": 5, "title": "breakdown-chart (plain)", "env": {"TERM": "Spectre.Console"}}
|
{"version": 2, "width": 84, "height": 5, "title": "breakdown-chart (plain)", "env": {"TERM": "Spectre.Console"}}
|
||||||
[0, "o", "\u001B[31m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[34m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[32m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[37m\u2588\u2588\u001B[0m\u001B[37m\u2588\u2588\u001B[0m\r\n\u001B[31m\u25A0\u001B[0m SCSS \u001B[37m80\u001B[0m \u001B[34m\u25A0\u001B[0m HTML \u001B[37m28.3\u001B[0m \u001B[32m\u25A0\u001B[0m C# \u001B[37m22.6\u001B[0m \u001B[37m\u25A0\u001B[0m JavaScript \u001B[37m6\u001B[0m \r\n\u001B[37m\u25A0\u001B[0m Ruby \u001B[37m6\u001B[0m \u001B[36m\u25A0\u001B[0m Shell \u001B[37m0.1\u001B[0m \r\n"]
|
[0, "o", "\u001B[31m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[34m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[32m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[37m\u2588\u2588\u001B[0m\u001B[37m\u2588\u2588\u001B[0m\r\n\u001B[31m\u25A0\u001B[0m SCSS \u001B[37m80\u001B[0m \u001B[34m\u25A0\u001B[0m HTML \u001B[37m28.3\u001B[0m \u001B[32m\u25A0\u001B[0m C# \u001B[37m22.6\u001B[0m \u001B[37m\u25A0\u001B[0m JavaScript \u001B[37m6\u001B[0m \r\n\u001B[37m\u25A0\u001B[0m Ruby \u001B[37m6\u001B[0m \u001B[36m\u25A0\u001B[0m Shell \u001B[37m0.1\u001B[0m \r\n"]
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
{"version": 2, "width": 122, "height": 5, "title": "breakdown-chart (rich)", "env": {"TERM": "Spectre.Console"}}
|
{"version": 2, "width": 84, "height": 5, "title": "breakdown-chart (rich)", "env": {"TERM": "Spectre.Console"}}
|
||||||
[0, "o", "\u001B[38;5;9m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[38;5;12m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[38;5;2m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[38;5;11m\u2588\u2588\u001B[0m\u001B[38;5;119m\u2588\u2588\u001B[0m\r\n\u001B[38;5;9m\u25A0\u001B[0m SCSS \u001B[38;5;8m80\u001B[0m \u001B[38;5;12m\u25A0\u001B[0m HTML \u001B[38;5;8m28.3\u001B[0m \u001B[38;5;2m\u25A0\u001B[0m C# \u001B[38;5;8m22.6\u001B[0m \u001B[38;5;11m\u25A0\u001B[0m JavaScript \u001B[38;5;8m6\u001B[0m \r\n\u001B[38;5;119m\u25A0\u001B[0m Ruby \u001B[38;5;8m6\u001B[0m \u001B[38;5;14m\u25A0\u001B[0m Shell \u001B[38;5;8m0.1\u001B[0m \r\n"]
|
[0, "o", "\u001B[38;5;9m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[38;5;12m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[38;5;2m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[38;5;11m\u2588\u2588\u001B[0m\u001B[38;5;119m\u2588\u2588\u001B[0m\r\n\u001B[38;5;9m\u25A0\u001B[0m SCSS \u001B[38;5;8m80\u001B[0m \u001B[38;5;12m\u25A0\u001B[0m HTML \u001B[38;5;8m28.3\u001B[0m \u001B[38;5;2m\u25A0\u001B[0m C# \u001B[38;5;8m22.6\u001B[0m \u001B[38;5;11m\u25A0\u001B[0m JavaScript \u001B[38;5;8m6\u001B[0m \r\n\u001B[38;5;119m\u25A0\u001B[0m Ruby \u001B[38;5;8m6\u001B[0m \u001B[38;5;14m\u25A0\u001B[0m Shell \u001B[38;5;8m0.1\u001B[0m \r\n"]
|
||||||
|
|
||||||
|
|||||||
43
docs/input/assets/casts/columns-plain.cast
Normal file
43
docs/input/assets/casts/columns-plain.cast
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{"version": 2, "width": 84, "height": 24, "title": "columns (plain)", "env": {"TERM": "Spectre.Console"}}
|
||||||
|
[0, "o", "\u001B[?25l"]
|
||||||
|
[0.094, "o", "\u001B[1;37mApple\u001B[0m "]
|
||||||
|
[0.297, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m "]
|
||||||
|
[0.5, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m "]
|
||||||
|
[0.719, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m "]
|
||||||
|
[0.922, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m "]
|
||||||
|
[1.125, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m "]
|
||||||
|
[1.344, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m "]
|
||||||
|
[1.563, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m"]
|
||||||
|
[1.766, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m"]
|
||||||
|
[1.969, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m\r\n\u001B[1;37mCherry\u001B[0m "]
|
||||||
|
[2.172, "o", "\r\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m\r\n\u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m "]
|
||||||
|
[2.375, "o", "\r\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m\r\n\u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m "]
|
||||||
|
[2.594, "o", "\r\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m\r\n\u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m "]
|
||||||
|
[2.797, "o", "\r\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m\r\n\u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m "]
|
||||||
|
[3, "o", "\r\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m\r\n\u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \u001B[1;37mGrape\u001B[0m "]
|
||||||
|
[3.219, "o", "\r\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m\r\n\u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m"]
|
||||||
|
[3.422, "o", "\r\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m\r\n\u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m\r\n\u001B[1;37mJackfruit\u001B[0m "]
|
||||||
|
[3.625, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m "]
|
||||||
|
[3.828, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m "]
|
||||||
|
[4.047, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m "]
|
||||||
|
[4.25, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m "]
|
||||||
|
[4.453, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m "]
|
||||||
|
[4.672, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m "]
|
||||||
|
[4.875, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m "]
|
||||||
|
[5.094, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m "]
|
||||||
|
[5.297, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m "]
|
||||||
|
[5.516, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m "]
|
||||||
|
[5.734, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m "]
|
||||||
|
[5.953, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m "]
|
||||||
|
[6.172, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m "]
|
||||||
|
[6.375, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m \u001B[1;37mPineapple\u001B[0m "]
|
||||||
|
[6.594, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m \u001B[1;37mPineapple\u001B[0m \u001B[1;37mPomelo\u001B[0m "]
|
||||||
|
[6.797, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m \u001B[1;37mPineapple\u001B[0m \u001B[1;37mPomelo\u001B[0m \u001B[1;37mRaspberry\u001B[0m "]
|
||||||
|
[7.016, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m \u001B[1;37mPineapple\u001B[0m \u001B[1;37mPomelo\u001B[0m \u001B[1;37mRaspberry\u001B[0m \u001B[1;37mSalmonberry\u001B[0m "]
|
||||||
|
[7.234, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m \u001B[1;37mPineapple\u001B[0m \u001B[1;37mPomelo\u001B[0m \u001B[1;37mRaspberry\u001B[0m \u001B[1;37mSalmonberry\u001B[0m \u001B[1;37mStrawberry\u001B[0m "]
|
||||||
|
[7.438, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m \u001B[1;37mPineapple\u001B[0m \u001B[1;37mPomelo\u001B[0m \u001B[1;37mRaspberry\u001B[0m \u001B[1;37mSalmonberry\u001B[0m \u001B[1;37mStrawberry\u001B[0m \r\n\u001B[1;37mXimenia\u001B[0m "]
|
||||||
|
[7.641, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m \u001B[1;37mPineapple\u001B[0m \u001B[1;37mPomelo\u001B[0m \u001B[1;37mRaspberry\u001B[0m \u001B[1;37mSalmonberry\u001B[0m \u001B[1;37mStrawberry\u001B[0m \r\n\u001B[1;37mXimenia\u001B[0m "]
|
||||||
|
[7.641, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K"]
|
||||||
|
[7.641, "o", "\u001B[?25h"]
|
||||||
|
[7.656, "o", "\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m \u001B[1;37mPineapple\u001B[0m \u001B[1;37mPomelo\u001B[0m \u001B[1;37mRaspberry\u001B[0m \u001B[1;37mSalmonberry\u001B[0m \u001B[1;37mStrawberry\u001B[0m \r\n\u001B[1;37mXimenia\u001B[0m \u001B[1;37mYuzu\u001B[0m \r\n"]
|
||||||
|
|
||||||
43
docs/input/assets/casts/columns-rich.cast
Normal file
43
docs/input/assets/casts/columns-rich.cast
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{"version": 2, "width": 84, "height": 24, "title": "columns (rich)", "env": {"TERM": "Spectre.Console"}}
|
||||||
|
[0, "o", "\u001B[?25l"]
|
||||||
|
[0, "o", "\u001B[1;38;5;11mApple\u001B[0m "]
|
||||||
|
[0.219, "o", "\r\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m "]
|
||||||
|
[0.422, "o", "\r\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m "]
|
||||||
|
[0.625, "o", "\r\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m "]
|
||||||
|
[0.828, "o", "\r\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m "]
|
||||||
|
[1.032, "o", "\r\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m "]
|
||||||
|
[1.235, "o", "\r\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m "]
|
||||||
|
[1.438, "o", "\r\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m \u001B[1;38;5;11mBreadfruit\u001B[0m"]
|
||||||
|
[1.641, "o", "\r\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m \u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m"]
|
||||||
|
[1.844, "o", "\r\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m \u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m\r\n\u001B[1;38;5;11mCherry\u001B[0m "]
|
||||||
|
[2.047, "o", "\r\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m \u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m\r\n\u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m "]
|
||||||
|
[2.266, "o", "\r\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m \u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m\r\n\u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m "]
|
||||||
|
[2.485, "o", "\r\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m \u001B[1;38;5;11mBreadfruit\u001B[0m\r\n\u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m "]
|
||||||
|
[2.703, "o", "\r\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m \u001B[1;38;5;11mBreadfruit\u001B[0m\r\n\u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m "]
|
||||||
|
[2.907, "o", "\r\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m \u001B[1;38;5;11mBreadfruit\u001B[0m\r\n\u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \u001B[1;38;5;11mGrape\u001B[0m "]
|
||||||
|
[3.11, "o", "\r\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m \u001B[1;38;5;11mBreadfruit\u001B[0m\r\n\u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m"]
|
||||||
|
[3.313, "o", "\r\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m \u001B[1;38;5;11mBreadfruit\u001B[0m\r\n\u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m\r\n\u001B[1;38;5;11mJackfruit\u001B[0m "]
|
||||||
|
[3.532, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m "]
|
||||||
|
[3.735, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m "]
|
||||||
|
[3.953, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m "]
|
||||||
|
[4.157, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m "]
|
||||||
|
[4.36, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m \r\n\u001B[1;38;5;11mMelon\u001B[0m "]
|
||||||
|
[4.578, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m \r\n\u001B[1;38;5;11mMelon\u001B[0m \u001B[1;38;5;11mOrange\u001B[0m "]
|
||||||
|
[4.782, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m \r\n\u001B[1;38;5;11mMelon\u001B[0m \u001B[1;38;5;11mOrange\u001B[0m \u001B[1;38;5;11mBlood orange\u001B[0m "]
|
||||||
|
[4.985, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m \r\n\u001B[1;38;5;11mMelon\u001B[0m \u001B[1;38;5;11mOrange\u001B[0m \u001B[1;38;5;11mBlood orange\u001B[0m \u001B[1;38;5;11mClementine\u001B[0m "]
|
||||||
|
[5.188, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m \r\n\u001B[1;38;5;11mMelon\u001B[0m \u001B[1;38;5;11mOrange\u001B[0m \u001B[1;38;5;11mBlood orange\u001B[0m \u001B[1;38;5;11mClementine\u001B[0m \u001B[1;38;5;11mMandarine\u001B[0m "]
|
||||||
|
[5.407, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m \r\n\u001B[1;38;5;11mMelon\u001B[0m \u001B[1;38;5;11mOrange\u001B[0m \u001B[1;38;5;11mBlood orange\u001B[0m \u001B[1;38;5;11mClementine\u001B[0m \u001B[1;38;5;11mMandarine\u001B[0m \u001B[1;38;5;11mTangerine\u001B[0m "]
|
||||||
|
[5.61, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m \r\n\u001B[1;38;5;11mMelon\u001B[0m \u001B[1;38;5;11mOrange\u001B[0m \u001B[1;38;5;11mBlood orange\u001B[0m \u001B[1;38;5;11mClementine\u001B[0m \u001B[1;38;5;11mMandarine\u001B[0m \u001B[1;38;5;11mTangerine\u001B[0m \u001B[1;38;5;11mPapaya\u001B[0m "]
|
||||||
|
[5.813, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m \r\n\u001B[1;38;5;11mMelon\u001B[0m \u001B[1;38;5;11mOrange\u001B[0m \u001B[1;38;5;11mBlood orange\u001B[0m \u001B[1;38;5;11mClementine\u001B[0m \u001B[1;38;5;11mMandarine\u001B[0m \u001B[1;38;5;11mTangerine\u001B[0m \u001B[1;38;5;11mPapaya\u001B[0m \r\n\u001B[1;38;5;11mPassionfruit\u001B[0m "]
|
||||||
|
[6.016, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m \r\n\u001B[1;38;5;11mMelon\u001B[0m \u001B[1;38;5;11mOrange\u001B[0m \u001B[1;38;5;11mBlood orange\u001B[0m \u001B[1;38;5;11mClementine\u001B[0m \u001B[1;38;5;11mMandarine\u001B[0m \u001B[1;38;5;11mTangerine\u001B[0m \u001B[1;38;5;11mPapaya\u001B[0m \r\n\u001B[1;38;5;11mPassionfruit\u001B[0m \u001B[1;38;5;11mPlum\u001B[0m "]
|
||||||
|
[6.219, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m \r\n\u001B[1;38;5;11mMelon\u001B[0m \u001B[1;38;5;11mOrange\u001B[0m \u001B[1;38;5;11mBlood orange\u001B[0m \u001B[1;38;5;11mClementine\u001B[0m \u001B[1;38;5;11mMandarine\u001B[0m \u001B[1;38;5;11mTangerine\u001B[0m \u001B[1;38;5;11mPapaya\u001B[0m \r\n\u001B[1;38;5;11mPassionfruit\u001B[0m \u001B[1;38;5;11mPlum\u001B[0m \u001B[1;38;5;11mPineapple\u001B[0m "]
|
||||||
|
[6.438, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m \r\n\u001B[1;38;5;11mMelon\u001B[0m \u001B[1;38;5;11mOrange\u001B[0m \u001B[1;38;5;11mBlood orange\u001B[0m \u001B[1;38;5;11mClementine\u001B[0m \u001B[1;38;5;11mMandarine\u001B[0m \u001B[1;38;5;11mTangerine\u001B[0m \u001B[1;38;5;11mPapaya\u001B[0m \r\n\u001B[1;38;5;11mPassionfruit\u001B[0m \u001B[1;38;5;11mPlum\u001B[0m \u001B[1;38;5;11mPineapple\u001B[0m \u001B[1;38;5;11mPomelo\u001B[0m "]
|
||||||
|
[6.657, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m \r\n\u001B[1;38;5;11mMelon\u001B[0m \u001B[1;38;5;11mOrange\u001B[0m \u001B[1;38;5;11mBlood orange\u001B[0m \u001B[1;38;5;11mClementine\u001B[0m \u001B[1;38;5;11mMandarine\u001B[0m \u001B[1;38;5;11mTangerine\u001B[0m \u001B[1;38;5;11mPapaya\u001B[0m \r\n\u001B[1;38;5;11mPassionfruit\u001B[0m \u001B[1;38;5;11mPlum\u001B[0m \u001B[1;38;5;11mPineapple\u001B[0m \u001B[1;38;5;11mPomelo\u001B[0m \u001B[1;38;5;11mRaspberry\u001B[0m "]
|
||||||
|
[6.86, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m \r\n\u001B[1;38;5;11mMelon\u001B[0m \u001B[1;38;5;11mOrange\u001B[0m \u001B[1;38;5;11mBlood orange\u001B[0m \u001B[1;38;5;11mClementine\u001B[0m \u001B[1;38;5;11mMandarine\u001B[0m \u001B[1;38;5;11mTangerine\u001B[0m \u001B[1;38;5;11mPapaya\u001B[0m \r\n\u001B[1;38;5;11mPassionfruit\u001B[0m \u001B[1;38;5;11mPlum\u001B[0m \u001B[1;38;5;11mPineapple\u001B[0m \u001B[1;38;5;11mPomelo\u001B[0m \u001B[1;38;5;11mRaspberry\u001B[0m \u001B[1;38;5;11mSalmonberry\u001B[0m "]
|
||||||
|
[7.063, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m \r\n\u001B[1;38;5;11mMelon\u001B[0m \u001B[1;38;5;11mOrange\u001B[0m \u001B[1;38;5;11mBlood orange\u001B[0m \u001B[1;38;5;11mClementine\u001B[0m \u001B[1;38;5;11mMandarine\u001B[0m \u001B[1;38;5;11mTangerine\u001B[0m \u001B[1;38;5;11mPapaya\u001B[0m \r\n\u001B[1;38;5;11mPassionfruit\u001B[0m \u001B[1;38;5;11mPlum\u001B[0m \u001B[1;38;5;11mPineapple\u001B[0m \u001B[1;38;5;11mPomelo\u001B[0m \u001B[1;38;5;11mRaspberry\u001B[0m \u001B[1;38;5;11mSalmonberry\u001B[0m \u001B[1;38;5;11mStrawberry\u001B[0m "]
|
||||||
|
[7.266, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m \r\n\u001B[1;38;5;11mMelon\u001B[0m \u001B[1;38;5;11mOrange\u001B[0m \u001B[1;38;5;11mBlood orange\u001B[0m \u001B[1;38;5;11mClementine\u001B[0m \u001B[1;38;5;11mMandarine\u001B[0m \u001B[1;38;5;11mTangerine\u001B[0m \u001B[1;38;5;11mPapaya\u001B[0m \r\n\u001B[1;38;5;11mPassionfruit\u001B[0m \u001B[1;38;5;11mPlum\u001B[0m \u001B[1;38;5;11mPineapple\u001B[0m \u001B[1;38;5;11mPomelo\u001B[0m \u001B[1;38;5;11mRaspberry\u001B[0m \u001B[1;38;5;11mSalmonberry\u001B[0m \u001B[1;38;5;11mStrawberry\u001B[0m \r\n\u001B[1;38;5;11mXimenia\u001B[0m "]
|
||||||
|
[7.485, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m \r\n\u001B[1;38;5;11mMelon\u001B[0m \u001B[1;38;5;11mOrange\u001B[0m \u001B[1;38;5;11mBlood orange\u001B[0m \u001B[1;38;5;11mClementine\u001B[0m \u001B[1;38;5;11mMandarine\u001B[0m \u001B[1;38;5;11mTangerine\u001B[0m \u001B[1;38;5;11mPapaya\u001B[0m \r\n\u001B[1;38;5;11mPassionfruit\u001B[0m \u001B[1;38;5;11mPlum\u001B[0m \u001B[1;38;5;11mPineapple\u001B[0m \u001B[1;38;5;11mPomelo\u001B[0m \u001B[1;38;5;11mRaspberry\u001B[0m \u001B[1;38;5;11mSalmonberry\u001B[0m \u001B[1;38;5;11mStrawberry\u001B[0m \r\n\u001B[1;38;5;11mXimenia\u001B[0m "]
|
||||||
|
[7.485, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K"]
|
||||||
|
[7.485, "o", "\u001B[?25h"]
|
||||||
|
[7.485, "o", "\u001B[1;38;5;11mApple\u001B[0m \u001B[1;38;5;11mApricot\u001B[0m \u001B[1;38;5;11mAvocado\u001B[0m \u001B[1;38;5;11mBanana\u001B[0m \u001B[1;38;5;11mBlackberry\u001B[0m \u001B[1;38;5;11mBlueberry\u001B[0m \u001B[1;38;5;11mBoysenberry\u001B[0m\r\n\u001B[1;38;5;11mBreadfruit\u001B[0m \u001B[1;38;5;11mCacao\u001B[0m \u001B[1;38;5;11mCherry\u001B[0m \u001B[1;38;5;11mCloudberry\u001B[0m \u001B[1;38;5;11mCoconut\u001B[0m \u001B[1;38;5;11mDragonfruit\u001B[0m \u001B[1;38;5;11mElderberry\u001B[0m \r\n\u001B[1;38;5;11mGrape\u001B[0m \u001B[1;38;5;11mGrapefruit\u001B[0m \u001B[1;38;5;11mJackfruit\u001B[0m \u001B[1;38;5;11mKiwifruit\u001B[0m \u001B[1;38;5;11mLemon\u001B[0m \u001B[1;38;5;11mLime\u001B[0m \u001B[1;38;5;11mMango\u001B[0m \r\n\u001B[1;38;5;11mMelon\u001B[0m \u001B[1;38;5;11mOrange\u001B[0m \u001B[1;38;5;11mBlood orange\u001B[0m \u001B[1;38;5;11mClementine\u001B[0m \u001B[1;38;5;11mMandarine\u001B[0m \u001B[1;38;5;11mTangerine\u001B[0m \u001B[1;38;5;11mPapaya\u001B[0m \r\n\u001B[1;38;5;11mPassionfruit\u001B[0m \u001B[1;38;5;11mPlum\u001B[0m \u001B[1;38;5;11mPineapple\u001B[0m \u001B[1;38;5;11mPomelo\u001B[0m \u001B[1;38;5;11mRaspberry\u001B[0m \u001B[1;38;5;11mSalmonberry\u001B[0m \u001B[1;38;5;11mStrawberry\u001B[0m \r\n\u001B[1;38;5;11mXimenia\u001B[0m \u001B[1;38;5;11mYuzu\u001B[0m \r\n"]
|
||||||
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
{"version": 2, "width": 122, "height": 24, "title": "panel (plain)", "env": {"TERM": "Spectre.Console"}}
|
{"version": 2, "width": 84, "height": 24, "title": "panel (plain)", "env": {"TERM": "Spectre.Console"}}
|
||||||
[0, "o", "\u2554\u2550\u2550\u001B[4mPasta Menu\u001B[0m\u2550\u2550\u2557\r\n\u2551 \u2551\r\n\u2551 \u2551\r\n\u2551 \u001B[31mSpaghetti\u001B[0m \u2551\r\n\u2551 \u001B[31mLinguini\u001B[0m \u2551\r\n\u2551 \u001B[31mFettucine\u001B[0m \u2551\r\n\u2551 \u001B[31mTortellini\u001B[0m \u2551\r\n\u2551 \u001B[31mCapellini\u001B[0m \u2551\r\n\u2551 \u001B[31mLasagna\u001B[0m \u2551\r\n\u2551 \u2551\r\n\u2551 \u2551\r\n\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D\r\n"]
|
[0, "o", "\u2554\u2550\u2550\u001B[4mPasta Menu\u001B[0m\u2550\u2550\u2557\r\n\u2551 \u2551\r\n\u2551 \u2551\r\n\u2551 \u001B[31mSpaghetti\u001B[0m \u2551\r\n\u2551 \u001B[31mLinguini\u001B[0m \u2551\r\n\u2551 \u001B[31mFettucine\u001B[0m \u2551\r\n\u2551 \u001B[31mTortellini\u001B[0m \u2551\r\n\u2551 \u001B[31mCapellini\u001B[0m \u2551\r\n\u2551 \u001B[31mLasagna\u001B[0m \u2551\r\n\u2551 \u2551\r\n\u2551 \u2551\r\n\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D\r\n"]
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
{"version": 2, "width": 122, "height": 24, "title": "panel (rich)", "env": {"TERM": "Spectre.Console"}}
|
{"version": 2, "width": 84, "height": 24, "title": "panel (rich)", "env": {"TERM": "Spectre.Console"}}
|
||||||
[0, "o", "\u2554\u2550\u2550\u001B[4mPasta Menu\u001B[0m\u2550\u2550\u2557\r\n\u2551 \u2551\r\n\u2551 \u2551\r\n\u2551 \u001B[38;5;9mSpaghetti\u001B[0m \u2551\r\n\u2551 \u001B[38;5;9mLinguini\u001B[0m \u2551\r\n\u2551 \u001B[38;5;9mFettucine\u001B[0m \u2551\r\n\u2551 \u001B[38;5;9mTortellini\u001B[0m \u2551\r\n\u2551 \u001B[38;5;9mCapellini\u001B[0m \u2551\r\n\u2551 \u001B[38;5;9mLasagna\u001B[0m \u2551\r\n\u2551 \u2551\r\n\u2551 \u2551\r\n\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D\r\n"]
|
[0, "o", "\u2554\u2550\u2550\u001B[4mPasta Menu\u001B[0m\u2550\u2550\u2557\r\n\u2551 \u2551\r\n\u2551 \u2551\r\n\u2551 \u001B[38;5;9mSpaghetti\u001B[0m \u2551\r\n\u2551 \u001B[38;5;9mLinguini\u001B[0m \u2551\r\n\u2551 \u001B[38;5;9mFettucine\u001B[0m \u2551\r\n\u2551 \u001B[38;5;9mTortellini\u001B[0m \u2551\r\n\u2551 \u001B[38;5;9mCapellini\u001B[0m \u2551\r\n\u2551 \u001B[38;5;9mLasagna\u001B[0m \u2551\r\n\u2551 \u2551\r\n\u2551 \u2551\r\n\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D\r\n"]
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
Title: Spectre.Console 0.47 released!
|
||||||
|
Description: Alacritty terminal support, command line improvements
|
||||||
|
Published: 2023-05-19
|
||||||
|
Category: Release Notes
|
||||||
|
Excluded: false
|
||||||
|
---
|
||||||
|
|
||||||
|
Version 0.47 of Spectre.Console has been released!
|
||||||
|
|
||||||
|
There are a lot of fixes and improvements in this release, the most noteworthy changes being support for the [Alacritty](https://github.com/alacritty/alacritty) terminal and continued improvements to command line parsing.
|
||||||
|
|
||||||
|
Thank you to all contributers.
|
||||||
|
|
||||||
|
## New Contributors
|
||||||
|
* [@wbaldoumas](https://github.com/wbaldoumas) made their first contribution in [#1143](https://github.com/spectreconsole/spectre.console/pull/1143)
|
||||||
|
* [@MartinZikmund](https://github.com/MartinZikmund) made their first contribution in [#1151](https://github.com/spectreconsole/spectre.console/pull/1151)
|
||||||
|
* [@ilyahryapko](https://github.com/ilyahryapko) made their first contribution in [#1131](https://github.com/spectreconsole/spectre.console/pull/1131)
|
||||||
|
* [@meziantou](https://github.com/meziantou) made their first contribution in [#1174](https://github.com/spectreconsole/spectre.console/pull/1174)
|
||||||
|
* [@MaxAtoms](https://github.com/MaxAtoms) made their first contribution in [#1211](https://github.com/spectreconsole/spectre.console/pull/1211)
|
||||||
|
* [@phillip-haydon](https://github.com/phillip-haydon) made their first contribution in [#1218](https://github.com/spectreconsole/spectre.console/pull/1218)
|
||||||
|
|
||||||
|
## What's Changed
|
||||||
|
* Add Alacritty to the supported terminals in AnsiDetector by [@MaxAtoms](https://github.com/MaxAtoms) in [#1211](https://github.com/spectreconsole/spectre.console/pull/1211)
|
||||||
|
* Add an implicit operator to convert from Color to Style by [@0xced](https://github.com/0xced) in [#1160](https://github.com/spectreconsole/spectre.console/pull/1160)
|
||||||
|
* Allow case-insensitive confirmation prompt by [@MartinZikmund](https://github.com/MartinZikmund) in [#1151](https://github.com/spectreconsole/spectre.console/pull/1151)
|
||||||
|
* Allow configuration of confirmation prompt comparison via `StringComparer` by [@MartinZikmund](https://github.com/MartinZikmund) in [#1161](https://github.com/spectreconsole/spectre.console/pull/1161)
|
||||||
|
* Do not register analyzer if SpectreConsole is not available in the current compilation by [@meziantou](https://github.com/meziantou) in [#1172](https://github.com/spectreconsole/spectre.console/pull/1172)
|
||||||
|
* Ensure correct comparer is used for `TextPrompt` by [@MartinZikmund](https://github.com/MartinZikmund) in [#1152](https://github.com/spectreconsole/spectre.console/pull/1152)
|
||||||
|
* Forward CancellationToken to GetOperation by [@meziantou](https://github.com/meziantou) in [#1173](https://github.com/spectreconsole/spectre.console/pull/1173)
|
||||||
|
* Fix minor typo in Prompt example by [@Frassle](https://github.com/Frassle) in [#1183](https://github.com/spectreconsole/spectre.console/pull/1183)
|
||||||
|
* Fix coconut spelling by [@phillip-haydon](https://github.com/phillip-haydon) in [#1218](https://github.com/spectreconsole/spectre.console/pull/1218)
|
||||||
|
* Improve conversion error messages by [@0xced](https://github.com/0xced) in [#1141](https://github.com/spectreconsole/spectre.console/pull/1141)
|
||||||
|
* Make the code fix more robust and detect more symbols of type IAnsiConsole by [@meziantou](https://github.com/meziantou) in [#1169](https://github.com/spectreconsole/spectre.console/pull/1169)
|
||||||
|
* Minor Refactorings by [@Elisha-Aguilera](https://github.com/Elisha-Aguilera) in [#1081](https://github.com/spectreconsole/spectre.console/pull/1081)
|
||||||
|
* Simplify access to the SemanticModel in analyzers by [@meziantou](https://github.com/meziantou) in [#1167](https://github.com/spectreconsole/spectre.console/pull/1167)
|
||||||
|
* Use SymbolEqualityComparer.Default when possible by [@meziantou](https://github.com/meziantou) in [#1171](https://github.com/spectreconsole/spectre.console/pull/1171)
|
||||||
|
* Use StringComparison.Ordinal instead of culture-sensitive comparisons by [@meziantou](https://github.com/meziantou) in [#1174](https://github.com/spectreconsole/spectre.console/pull/1174)
|
||||||
|
|
||||||
|
## Command line updates
|
||||||
|
* Add possibility to set description and/or data for the default command by [@0xced](https://github.com/0xced) in [#1091](https://github.com/spectreconsole/spectre.console/pull/1091)
|
||||||
|
* Add support for converting command parameters into FileInfo and DirectoryInfo by [@0xced](https://github.com/0xced) in [#1145](https://github.com/spectreconsole/spectre.console/pull/1145)
|
||||||
|
* Add support for arrays in \[DefaultValue\] attributes by [@0xced](https://github.com/0xced) in [#1164](https://github.com/spectreconsole/spectre.console/pull/1164)
|
||||||
|
* Add ability to pass example args using `params` syntax by [@seclerp](https://github.com/seclerp) in [#1166](https://github.com/spectreconsole/spectre.console/pull/1166)
|
||||||
|
* Alias for branches by [@ilyahryapko](https://github.com/ilyahryapko) in [#1131](https://github.com/spectreconsole/spectre.console/pull/1131)
|
||||||
|
* Command line improvements by [@FrankRay78](https://github.com/FrankRay78) in [#1103](https://github.com/spectreconsole/spectre.console/pull/1103)
|
||||||
|
|
||||||
|
## Documentation updates
|
||||||
|
* Alignment => Justification Docs Fixes by [@wbaldoumas](https://github.com/wbaldoumas) in [#1143](https://github.com/spectreconsole/spectre.console/pull/1143)
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
Title: Spectre.Console 0.48 released!
|
||||||
|
Description: .NET 8, custom help providers, and more!
|
||||||
|
Published: 2023-11-22
|
||||||
|
Category: Release Notes
|
||||||
|
Excluded: false
|
||||||
|
---
|
||||||
|
|
||||||
|
Version 0.48 of Spectre.Console has been released!
|
||||||
|
|
||||||
|
Several rendering issues have been addressed, such as fixing problems related to rendering inside status causing corrupt output, avoiding exceptions on Rows with no children, as well as addressing rendering bugs in TextPath.
|
||||||
|
|
||||||
|
New features have been added, such as the ability to show separators between table rows. Other notable additions include progress bar header and footer support, customizable (and localizable) help providers, and the option to style text and confirmation prompts.
|
||||||
|
|
||||||
|
# New Contributors
|
||||||
|
|
||||||
|
* [@icalvo](https://github.com/icalvo) made their first contribution in [#1215](https://github.com/spectreconsole/spectre.console/pull/1215)
|
||||||
|
* [@fredrikbentzen](https://github.com/fredrikbentzen) made their first contribution in [#1132](https://github.com/spectreconsole/spectre.console/pull/1132)
|
||||||
|
* [@jeppevammenkristensen](https://github.com/jeppevammenkristensen) made their first contribution in [#1241](https://github.com/spectreconsole/spectre.console/pull/1241)
|
||||||
|
* [@tomaszprasolek](https://github.com/tomaszprasolek) made their first contribution in [#1257](https://github.com/spectreconsole/spectre.console/pull/1257)
|
||||||
|
* [@olabacker](https://github.com/olabacker) made their first contribution in [#1302](https://github.com/spectreconsole/spectre.console/pull/1302)
|
||||||
|
* [@AndrewRathbun](https://github.com/AndrewRathbun) made their first contribution in [#1315](https://github.com/spectreconsole/spectre.console/pull/1315)
|
||||||
|
|
||||||
|
|
||||||
|
# What's Changed
|
||||||
|
|
||||||
|
## Rendering
|
||||||
|
|
||||||
|
* Add .NET 8 support by [@patriksvensson](https://github.com/patriksvensson) in [#1367](https://github.com/spectreconsole/spectre.console/pull/1367)
|
||||||
|
* Fixed render issue where writeline inside status caused corrupt output #415 #694 by [@fredrikbentzen](https://github.com/fredrikbentzen) in [#1132]([#1132](https://github.com/spectreconsole/spectre.console/pull/1132))
|
||||||
|
* Relax the SDK requirements by rolling forward to the latest feature by [@0xced](https://github.com/0xced) in [#1237]([#1237](https://github.com/spectreconsole/spectre.console/pull/1237))
|
||||||
|
* Add fix to avoid exception on rows with no children by [@jeppevammenkristensen](https://github.com/jeppevammenkristensen) in [#1241]([#1241](https://github.com/spectreconsole/spectre.console/pull/1241))
|
||||||
|
* Set `end_of_line` to `LF` instead of `CRLF` by [@0xced](https://github.com/0xced) in [#1256](https://github.com/spectreconsole/spectre.console/pull/1256)
|
||||||
|
* Fix `Rule` widget docs by [@tomaszprasolek](https://github.com/tomaszprasolek) in [#1257](https://github.com/spectreconsole/spectre.console/pull/1257)
|
||||||
|
* Added the missing columns-cast by [@nils](https://github.com/nils)-a in [#1294](https://github.com/spectreconsole/spectre.console/pull/1294)
|
||||||
|
* Render tables with zero-width columns by [@Frassle](https://github.com/Frassle) in [#1197](https://github.com/spectreconsole/spectre.console/pull/1197)
|
||||||
|
* Fix figlet centering possibly throwing due to negative size by [@olabacker](https://github.com/olabacker) in [#1302](https://github.com/spectreconsole/spectre.console/pull/1302)
|
||||||
|
* Add option to show separator between table rows by [@patriksvensson](https://github.com/patriksvensson) in [#1304](https://github.com/spectreconsole/spectre.console/pull/1304)
|
||||||
|
* Enable setting the color of the values in a `BreakdownChart` by [@nils](https://github.com/nils)-a in [#1303](https://github.com/spectreconsole/spectre.console/pull/1303)
|
||||||
|
* Progress bar header and footer by [@phil](https://github.com/phil)-scott-78 in [#1262](https://github.com/spectreconsole/spectre.console/pull/1262)
|
||||||
|
* Add an example showing the decorations off by [@Frassle](https://github.com/Frassle) in [#1191](https://github.com/spectreconsole/spectre.console/pull/1191)
|
||||||
|
* Fixes `TextPath` rendering bugs by [@patriksvensson](https://github.com/patriksvensson) in [#1308](https://github.com/spectreconsole/spectre.console/pull/1308)
|
||||||
|
* Fix greedy row measure by [@nils](https://github.com/nils)-a in [#1338](https://github.com/spectreconsole/spectre.console/pull/1338)
|
||||||
|
* Fix `AnsiConsoleOutput` safe height by [@0xced](https://github.com/0xced) in [#1358](https://github.com/spectreconsole/spectre.console/pull/1358)
|
||||||
|
* Allow passing a nullable style in `DefaultValueStyle()` and `ChoicesStyle()` by [@0xced](https://github.com/0xced) in [#1359](https://github.com/spectreconsole/spectre.console/pull/1359)
|
||||||
|
* Allow `ConfirmationPrompt` Styling by [@wbaldoumas](https://github.com/wbaldoumas) in [#1210](https://github.com/spectreconsole/spectre.console/pull/1210)
|
||||||
|
|
||||||
|
## CLI
|
||||||
|
* Add async command unit tests by [@FrankRay78](https://github.com/FrankRay78) in [#1228](https://github.com/spectreconsole/spectre.console/pull/1228)
|
||||||
|
* Add support for async delegate by [@icalvo](https://github.com/icalvo) in [#1215]([#1215](https://github.com/spectreconsole/spectre.console/pull/1215))
|
||||||
|
* Remove unnecessary `[NotNull]` attributes by [@0xced](https://github.com/0xced) in [#1255](https://github.com/spectreconsole/spectre.console/pull/1255)
|
||||||
|
* Allow custom help providers by [@FrankRay78](https://github.com/FrankRay78) in [#1259](https://github.com/spectreconsole/spectre.console/pull/1259)
|
||||||
|
* Specified details for settings for the argument vector by [@nils](https://github.com/nils)-a in [#1301](https://github.com/spectreconsole/spectre.console/pull/1301)
|
||||||
|
* Add support for localisation in help provider by [@FrankRay78](https://github.com/FrankRay78) in [#1349](https://github.com/spectreconsole/spectre.console/pull/1349)
|
||||||
|
* Fix DefaultValue for `FileInfo` and `DirectoryInfo` by [@0xced](https://github.com/0xced) in [#1238](https://github.com/spectreconsole/spectre.console/pull/1238)
|
||||||
|
|
||||||
|
## Documentation & Samples
|
||||||
|
* Added a minimal PR template by [@nils](https://github.com/nils)-a in [#1318](https://github.com/spectreconsole/spectre.console/pull/1318)
|
||||||
|
* Fix typo in `showcase` sample by [@AndrewRathbun](https://github.com/AndrewRathbun) in [#1315](https://github.com/spectreconsole/spectre.console/pull/1315)
|
||||||
|
* Update `columns` sample to showcase nicer data by [@nils](https://github.com/nils)-a in [#1295](https://github.com/spectreconsole/spectre.console/pull/1295)
|
||||||
|
* Change all `SetErrorHandler` to `SetExceptionHandler` by [@nils](https://github.com/nils)-a in [#1298](https://github.com/spectreconsole/spectre.console/pull/1298)
|
||||||
|
|
||||||
|
## Other stuff
|
||||||
|
* Ensure the `Generator` project compiles by [@patriksvensson](https://github.com/patriksvensson) in [#1371](https://github.com/spectreconsole/spectre.console/pull/1371)
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
Title: Spectre.Console 0.49 released!
|
||||||
|
Description: Bug fixes, bug fixes, bug fixes
|
||||||
|
Published: 2024-04-23
|
||||||
|
Category: Release Notes
|
||||||
|
Excluded: false
|
||||||
|
---
|
||||||
|
|
||||||
|
Version 0.49 of Spectre.Console has been released!
|
||||||
|
|
||||||
|
## New Contributors
|
||||||
|
* @baronfel made their first contribution in https://github.com/spectreconsole/spectre.console/pull/1425
|
||||||
|
* @DarqueWarrior made their first contribution in https://github.com/spectreconsole/spectre.console/pull/1431
|
||||||
|
* @tonycknight made their first contribution in https://github.com/spectreconsole/spectre.console/pull/1435
|
||||||
|
* @caesay made their first contribution in https://github.com/spectreconsole/spectre.console/pull/1439
|
||||||
|
* @jsheely made their first contribution in https://github.com/spectreconsole/spectre.console/pull/1414
|
||||||
|
* @danielcweber made their first contribution in https://github.com/spectreconsole/spectre.console/pull/1456
|
||||||
|
* @martincostello made their first contribution in https://github.com/spectreconsole/spectre.console/pull/1477
|
||||||
|
* @slang25 made their first contribution in https://github.com/spectreconsole/spectre.console/pull/1289
|
||||||
|
* @thomhurst made their first contribution in https://github.com/spectreconsole/spectre.console/pull/1250
|
||||||
|
* @gerardog made their first contribution in https://github.com/spectreconsole/spectre.console/pull/1489
|
||||||
|
* @yenneferofvengerberg made their first contribution in https://github.com/spectreconsole/spectre.console/pull/1503
|
||||||
|
* @BlazeFace made their first contribution in https://github.com/spectreconsole/spectre.console/pull/1509
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
* Cleanup line endings by @nils-a in https://github.com/spectreconsole/spectre.console/pull/1381
|
||||||
|
* Added Spectre.Console.Cli to quick-start. by @nils-a in https://github.com/spectreconsole/spectre.console/pull/1413
|
||||||
|
* Fix rendering of ListPrompt for odd pageSizes by @nils-a in https://github.com/spectreconsole/spectre.console/pull/1365
|
||||||
|
* Remove mandelbrot example due to conflicting license by @patriksvensson in https://github.com/spectreconsole/spectre.console/pull/1426
|
||||||
|
* Allow specifying a property to ignore the use of build-time packages for versioning and analysis by @baronfel in https://github.com/spectreconsole/spectre.console/pull/1425
|
||||||
|
* Add the possibility to register multiple interceptors by @nils-a in https://github.com/spectreconsole/spectre.console/pull/1412
|
||||||
|
* Added the ITypeResolver to the ExceptionHandler by @nils-a in https://github.com/spectreconsole/spectre.console/pull/1411
|
||||||
|
* Updated typo in commandApp.md by @DarqueWarrior in https://github.com/spectreconsole/spectre.console/pull/1431
|
||||||
|
* Command with -v displays app version instead of executing the command by @FrankRay78 in https://github.com/spectreconsole/spectre.console/pull/1427
|
||||||
|
* HelpProvider colors should be configurable by @FrankRay78 in https://github.com/spectreconsole/spectre.console/pull/1408
|
||||||
|
* Direct contributors to the current CONTRIBUTING.md by @tonycknight in https://github.com/spectreconsole/spectre.console/pull/1435
|
||||||
|
* Fix deadlock when cancelling prompts by @caesay in https://github.com/spectreconsole/spectre.console/pull/1439
|
||||||
|
* Add progress bar value formatter by @jsheely in https://github.com/spectreconsole/spectre.console/pull/1414
|
||||||
|
* Update dependencies and do some clean-up by @patriksvensson in https://github.com/spectreconsole/spectre.console/pull/1440
|
||||||
|
* Delete [UsesVerify], which has become obsolete through the latest update. by @danielcweber in https://github.com/spectreconsole/spectre.console/pull/1456
|
||||||
|
* Don't erase secret prompt text upon backspace when mask is null by @danielcweber in https://github.com/spectreconsole/spectre.console/pull/1458
|
||||||
|
* Update dependencies to the latest version by @patriksvensson in https://github.com/spectreconsole/spectre.console/pull/1459
|
||||||
|
* Automatically register command settings by @patriksvensson in https://github.com/spectreconsole/spectre.console/pull/1463
|
||||||
|
* Remove [DebuggerDisplay] from Paragraph by @martincostello in https://github.com/spectreconsole/spectre.console/pull/1477
|
||||||
|
* Selection Prompt Search by @slang25 in https://github.com/spectreconsole/spectre.console/pull/1289
|
||||||
|
* Update dependency SixLabors.ImageSharp to v3.1.3 by @renovate in https://github.com/spectreconsole/spectre.console/pull/1486
|
||||||
|
* Positioned Progress Tasks - Before or After Other Tasks by @thomhurst in https://github.com/spectreconsole/spectre.console/pull/1250
|
||||||
|
* Added NoStackTrace to ExceptionFormats by @gerardog in https://github.com/spectreconsole/spectre.console/pull/1489
|
||||||
|
* Pipe character for listing options (issue 1434) by @FrankRay78 in https://github.com/spectreconsole/spectre.console/pull/1498
|
||||||
|
* Improve XmlDoc output by @yenneferofvengerberg in https://github.com/spectreconsole/spectre.console/pull/1503
|
||||||
|
* Revert 71a5d830 to undo flickering regression by @phil-scott-78 in https://github.com/spectreconsole/spectre.console/pull/1504
|
||||||
|
* AddDelegate uses an abstract type when used in a branch by @BlazeFace in https://github.com/spectreconsole/spectre.console/pull/1509
|
||||||
|
* Missing Separator When Headers are Hidden by @BlazeFace in https://github.com/spectreconsole/spectre.console/pull/1513
|
||||||
|
* Expose raw arguments on the command context by @patriksvensson in https://github.com/spectreconsole/spectre.console/pull/1523
|
||||||
|
* Add token representation to remaining arguments by @patriksvensson in https://github.com/spectreconsole/spectre.console/pull/1525
|
||||||
75
docs/input/cli/command-help.md
Normal file
75
docs/input/cli/command-help.md
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
Title: Command Help
|
||||||
|
Order: 13
|
||||||
|
Description: "Console applications built with *Spectre.Console.Cli* include automatically generated help command line help."
|
||||||
|
---
|
||||||
|
|
||||||
|
Console applications built with `Spectre.Console.Cli` include automatically generated help which is displayed when `-h` or `--help` has been specified on the command line.
|
||||||
|
|
||||||
|
The automatically generated help is derived from the configured commands and their command settings.
|
||||||
|
|
||||||
|
The help is also context aware and tailored depending on what has been specified on the command line before it. For example,
|
||||||
|
|
||||||
|
1. When `-h` or `--help` appears immediately after the application name (eg. `application.exe --help`), then the help displayed is a high-level summary of the application, including any command line examples and a listing of all possible commands the user can execute.
|
||||||
|
|
||||||
|
2. When `-h` or `--help` appears immediately after a command has been specified (eg. `application.exe command --help`), then the help displayed is specific to the command and includes information about command specific switches and any default values.
|
||||||
|
|
||||||
|
`HelpProvider` is the `Spectre.Console` class responsible for determining context and preparing the help text to write to the console. It is an implementation of the public interface `IHelpProvider`.
|
||||||
|
|
||||||
|
## Styling the help text
|
||||||
|
|
||||||
|
Basic styling is applied to the generated help text by default, however this is configurable.
|
||||||
|
|
||||||
|
`HelpProviderStyle` is the `Spectre.Console` class that holds the style information for the help text.
|
||||||
|
|
||||||
|
The default theme shipped with Spectre.Console is provided by a factory method, `HelpProviderStyle.Default`.
|
||||||
|
|
||||||
|
However, you can explicitly set a custom theme when configuring a CommandApp, for example:
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
config.Settings.HelpProviderStyles = new HelpProviderStyle()
|
||||||
|
{
|
||||||
|
Description = new DescriptionStyle()
|
||||||
|
{
|
||||||
|
Header = "bold",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
Removing all styling from help text is also possible, a good choice for ensuring maximum accessibility. This is configured by clearing the style provider entirely:
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
config.Settings.HelpProviderStyles = null;
|
||||||
|
```
|
||||||
|
|
||||||
|
See [Markup](../markup) for information about the use of markup in Spectre.Console, and [Styles](xref:styles) for a listing of supported styles.
|
||||||
|
|
||||||
|
## Custom help providers
|
||||||
|
|
||||||
|
Whilst it shouldn't be common place to implement your own help provider, it is however possible.
|
||||||
|
|
||||||
|
You are able to implement your own `IHelpProvider` and configure a `CommandApp` to use that instead of the Spectre.Console help provider.
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
|
namespace Help;
|
||||||
|
|
||||||
|
public static class Program
|
||||||
|
{
|
||||||
|
public static int Main(string[] args)
|
||||||
|
{
|
||||||
|
var app = new CommandApp<DefaultCommand>();
|
||||||
|
|
||||||
|
app.Configure(config =>
|
||||||
|
{
|
||||||
|
// Register the custom help provider
|
||||||
|
config.SetHelpProvider(new CustomHelpProvider(config.Settings));
|
||||||
|
});
|
||||||
|
|
||||||
|
return app.Run(args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
There is a working [example of a custom help provider](https://github.com/spectreconsole/spectre.console/tree/main/examples/Cli/Help) demonstrating this.
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ app.Configure(config =>
|
|||||||
|
|
||||||
## Multiple Commands
|
## Multiple Commands
|
||||||
|
|
||||||
In the previous example we have a single command that is configured. For complex command line applications, it is common for them to have multiple commands (or verbs) defined. Examples of applications like this are `git`, `dotnet` and `gh`. For example, git would have a `commit` command and along with other commits like `add` or `rebase`. Each with their own settings and validation. With `Spectre.Console.Cli` we use the `Configure` method to add these commands.
|
In the previous example we have a single command that is configured. For complex command line applications, it is common for them to have multiple commands (or verbs) defined. Examples of applications like this are `git`, `dotnet` and `gh`. For example, git would have a `commit` command and along with other commands like `add` or `rebase`. Each with their own settings and validation. With `Spectre.Console.Cli` we use the `Configure` method to add these commands.
|
||||||
|
|
||||||
For example, to add three different commands to the application:
|
For example, to add three different commands to the application:
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ For more complex command hierarchical configurations, they can also be composed
|
|||||||
|
|
||||||
## Customizing Command Configurations
|
## Customizing Command Configurations
|
||||||
|
|
||||||
The `Configure` method is also used to change how help for the commands is generated. This configuration will give our command an additional alias of `file-size` and a description to be used when displaying the help. Additional, an example is specified that will be parsed and displayed for users asking for help. Multiple examples can be provided. Commands can also be marked as hidden. With this option they are still executable, but will not be displayed in help screens.
|
The `Configure` method is also used to change how help for the commands is generated. This configuration will give our command an additional alias of `file-size` and a description to be used when displaying the help. Additionally, an example is specified that will be parsed and displayed for users asking for help. Multiple examples can be provided. Commands can also be marked as hidden. With this option they are still executable, but will not be displayed in help screens.
|
||||||
|
|
||||||
``` csharp
|
``` csharp
|
||||||
var app = new CommandApp();
|
var app = new CommandApp();
|
||||||
@@ -81,9 +81,12 @@ Hint: If you do write your own implementation of `TypeRegistrar` and `TypeResolv
|
|||||||
there is a utility `TypeRegistrarBaseTests` available that can be used to ensure your implementations adhere to the required implementation. Simply call `TypeRegistrarBaseTests.RunAllTests()` and expect no `TypeRegistrarBaseTests.TestFailedException` to be thrown.
|
there is a utility `TypeRegistrarBaseTests` available that can be used to ensure your implementations adhere to the required implementation. Simply call `TypeRegistrarBaseTests.RunAllTests()` and expect no `TypeRegistrarBaseTests.TestFailedException` to be thrown.
|
||||||
|
|
||||||
## Interception
|
## Interception
|
||||||
|
Interceptors can be registered with the `TypeRegistrar` (or with a custom DI-Container). Alternatively, `CommandApp` also provides a `SetInterceptor` configuration.
|
||||||
|
|
||||||
`CommandApp` also provides a `SetInterceptor` configuration. An interceptor is run before all commands are executed. This is typically used for configuring logging or other infrastructure concerns.
|
All interceptors must implement `ICommandInterceptor`. Upon execution of a command, The `Intercept`-Method of an instance of your interceptor will be called with the parsed settings. This provides an opportunity for configuring any infrastructure or modifying the settings.
|
||||||
|
When the command has been run, the `InterceptResult`-Method of the same instance is called with the result of the command.
|
||||||
|
This provides an opportunity to modify the result and also to tear down any infrastructure in use.
|
||||||
|
|
||||||
All interceptors must implement `ICommandInterceptor`. Upon execution of a command, an instance of your interceptor will be called with the parsed settings. This provides an opportunity for configuring any infrastructure or modifying the settings.
|
The `Intercept`-Method of each interceptor is run before the command is executed and the `InterceptResult`-Method is run after it. These are typically used for configuring logging or other infrastructure concerns.
|
||||||
|
|
||||||
For an example of using the interceptor to configure logging, see the [Serilog demo](https://github.com/spectreconsole/spectre.console/tree/main/examples/Cli/Logging).
|
For an example of using the interceptor to configure logging, see the [Serilog demo](https://github.com/spectreconsole/spectre.console/tree/main/examples/Cli/Logging).
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Order: 12
|
|||||||
Description: "Handling exceptions in *Spectre.Console.Cli*"
|
Description: "Handling exceptions in *Spectre.Console.Cli*"
|
||||||
---
|
---
|
||||||
|
|
||||||
Exceptions happen.
|
Exceptions happen.
|
||||||
|
|
||||||
`Spectre.Console.Cli` handles exceptions, writes a user friendly message to the console and sets the exitCode
|
`Spectre.Console.Cli` handles exceptions, writes a user friendly message to the console and sets the exitCode
|
||||||
of the application to `-1`.
|
of the application to `-1`.
|
||||||
@@ -49,11 +49,15 @@ namespace MyApp
|
|||||||
|
|
||||||
## Using a custom ExceptionHandler
|
## Using a custom ExceptionHandler
|
||||||
|
|
||||||
Using the `SetErrorHandler()` during configuration it is possible to handle exceptions in a defined way.
|
Using the `SetExceptionHandler()` during configuration it is possible to handle exceptions in a defined way.
|
||||||
This method comes in two flavours: One that uses the default exitCode (or `return` value) of `-1` and one
|
This method comes in two flavours: One that uses the default exitCode (or `return` value) of `-1` and one
|
||||||
where the exitCode needs to be supplied.
|
where the exitCode needs to be supplied.
|
||||||
|
|
||||||
### Using `SetErrorHandler(Func<Exception, int> handler)`
|
The `ITypeResolver?` parameter will be null, when the exception occurs while no `ITypeResolver` is available.
|
||||||
|
(Basically the `ITypeResolver` will be set, when the exception occurs during a command execution, but not
|
||||||
|
during the parsing phase and construction of the command.)
|
||||||
|
|
||||||
|
### Using `SetExceptionHandler(Func<Exception, ITypeResolver?, int> handler)`
|
||||||
|
|
||||||
Using this method exceptions can be handled in a custom way. The return value of the handler is used as
|
Using this method exceptions can be handled in a custom way. The return value of the handler is used as
|
||||||
the exitCode for the application.
|
the exitCode for the application.
|
||||||
@@ -71,7 +75,7 @@ namespace MyApp
|
|||||||
|
|
||||||
app.Configure(config =>
|
app.Configure(config =>
|
||||||
{
|
{
|
||||||
config.SetExceptionHandler(ex =>
|
config.SetExceptionHandler((ex, resolver) =>
|
||||||
{
|
{
|
||||||
AnsiConsole.WriteException(ex, ExceptionFormats.ShortenEverything);
|
AnsiConsole.WriteException(ex, ExceptionFormats.ShortenEverything);
|
||||||
return -99;
|
return -99;
|
||||||
@@ -84,9 +88,9 @@ namespace MyApp
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using `SetErrorHandler(Action<Exception> handler)`
|
### Using `SetExceptionHandler(Action<Exception, ITypeResolver?> handler)`
|
||||||
|
|
||||||
Using this method exceptions can be handled in a custom way, much the same as with the `SetErrorHandler(Func<Exception, int> handler)`.
|
Using this method exceptions can be handled in a custom way, much the same as with the `SetExceptionHandler(Func<Exception, ITypeResolver?, int> handler)`.
|
||||||
Using the `Action` as the handler however, it is not possible (or required) to supply a return value.
|
Using the `Action` as the handler however, it is not possible (or required) to supply a return value.
|
||||||
The exitCode for the application will be `-1`.
|
The exitCode for the application will be `-1`.
|
||||||
|
|
||||||
@@ -103,7 +107,7 @@ namespace MyApp
|
|||||||
|
|
||||||
app.Configure(config =>
|
app.Configure(config =>
|
||||||
{
|
{
|
||||||
config.SetExceptionHandler(ex =>
|
config.SetExceptionHandler((ex, resolver) =>
|
||||||
{
|
{
|
||||||
AnsiConsole.WriteException(ex, ExceptionFormats.ShortenEverything);
|
AnsiConsole.WriteException(ex, ExceptionFormats.ShortenEverything);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Title: Specifying Settings
|
Title: Specifying Settings
|
||||||
Order: 5
|
Order: 5
|
||||||
Description: "How to define command line argument settings for your *Spectre.Console.Cli* Commands"
|
Description: "How to define command line argument settings for your *Spectre.Console.Cli* Commands"
|
||||||
Reference:
|
Reference:
|
||||||
- T:Spectre.Console.Cli.CommandSettings
|
- T:Spectre.Console.Cli.CommandSettings
|
||||||
- T:Spectre.Console.Cli.CommandArgumentAttribute
|
- T:Spectre.Console.Cli.CommandArgumentAttribute
|
||||||
- T:Spectre.Console.Cli.CommandOptionAttribute
|
- T:Spectre.Console.Cli.CommandOptionAttribute
|
||||||
@@ -26,7 +26,7 @@ This setting file tells `Spectre.Console.Cli` that our command has two parameter
|
|||||||
|
|
||||||
## CommandArgument
|
## CommandArgument
|
||||||
|
|
||||||
Arguments have a position and a name. The name is not only used for generating help, but its formatting is used to determine whether or not the argument is optional. The name must either be surrounded by square brackets (e.g. `[name]`) or angle brackets (e.g. `<name>`). Angle brackets denote required whereas square brackets denote optional. If neither are specified an exception will be thrown.
|
Arguments have a position and a name. The name is not only used for generating help, but its formatting is used to determine whether or not the argument is optional. Angle brackets denote a required argument (e.g. `<name>`) whereas square brackets denote an optional argument (e.g. `[name]`). If neither are specified an exception will be thrown.
|
||||||
|
|
||||||
The position is used for scenarios where there could be more than one argument.
|
The position is used for scenarios where there could be more than one argument.
|
||||||
|
|
||||||
@@ -86,7 +86,9 @@ public int Count { get; set; }
|
|||||||
|
|
||||||
## Arrays
|
## Arrays
|
||||||
|
|
||||||
`CommandArgument` can be defined as arrays and any additional parameters will be included in the value. For example
|
### Argument Vector
|
||||||
|
|
||||||
|
One (exactly one) `CommandArgument` can be defined as an array, and any additional parameters will be included in the value. For example:
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
[CommandArgument(0, "[name]")]
|
[CommandArgument(0, "[name]")]
|
||||||
@@ -95,6 +97,19 @@ public string[] Name { get; set; }
|
|||||||
|
|
||||||
Would allow the user to run `app.exe Dwayne Elizondo "Mountain Dew" Herbert Camacho`. The settings passed to the command would have a 5 element array consisting of Dwayne, Elizondo, Mountain Dew, Herbert and Camacho.
|
Would allow the user to run `app.exe Dwayne Elizondo "Mountain Dew" Herbert Camacho`. The settings passed to the command would have a 5 element array consisting of Dwayne, Elizondo, Mountain Dew, Herbert and Camacho.
|
||||||
|
|
||||||
|
A command can have only one argument vector, and it needs to be the last argument. (I.e. there can be no `CommandArgument` whose position is higher than that of the argument vector.)
|
||||||
|
|
||||||
|
### Option Arrays
|
||||||
|
|
||||||
|
A `CommandOption` can be defined as an array like the following:
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
[CommandOption("-n|--name <VALUES>")]
|
||||||
|
public string[] Names { get; set; },
|
||||||
|
```
|
||||||
|
|
||||||
|
This would allow the user to run `app.exe --name Dwayne --name Elizondo --name "Mountain Dew" --name Herbert --name Camacho` and would result in a 5 element array consisting of Dwayne, Elizondo, Mountain Dew, Herbert and Camacho.
|
||||||
|
|
||||||
## Constructors
|
## Constructors
|
||||||
|
|
||||||
`Spectre.Console.Cli` supports constructor initialization and init only initialization. For constructor initialization, the parameter name of the constructor must match the name of the property name of the settings class. Order does not matter.
|
`Spectre.Console.Cli` supports constructor initialization and init only initialization. For constructor initialization, the parameter name of the constructor must match the name of the property name of the settings class. Order does not matter.
|
||||||
|
|||||||
@@ -1,119 +1,119 @@
|
|||||||
Title: Markup
|
Title: Markup
|
||||||
Order: 30
|
Order: 30
|
||||||
Description: The Markup class allows you to output rich text to the console.
|
Description: The Markup class allows you to output rich text to the console.
|
||||||
Highlights:
|
Highlights:
|
||||||
- Easily add *color*.
|
- Easily add *color*.
|
||||||
- Add hyperlinks to for supported terminals.
|
- Add hyperlinks to for supported terminals.
|
||||||
- Emoji 🚀 parsing.
|
- Emoji 🚀 parsing.
|
||||||
Reference:
|
Reference:
|
||||||
- M:Spectre.Console.AnsiConsole.Markup(System.String)
|
- M:Spectre.Console.AnsiConsole.Markup(System.String)
|
||||||
- M:Spectre.Console.AnsiConsole.MarkupLine(System.String)
|
- M:Spectre.Console.AnsiConsole.MarkupLine(System.String)
|
||||||
- T:Spectre.Console.Markup
|
- T:Spectre.Console.Markup
|
||||||
---
|
---
|
||||||
|
|
||||||
The `Markup` class allows you to output rich text to the console.
|
The `Markup` class allows you to output rich text to the console.
|
||||||
|
|
||||||
## Syntax
|
## Syntax
|
||||||
|
|
||||||
Console markup uses a syntax inspired by bbcode. If you write the style (see [Styles](xref:styles))
|
Console markup uses a syntax inspired by bbcode. If you write the style (see [Styles](xref:styles))
|
||||||
in square brackets, e.g. `[bold red]`, that style will apply until it is closed with a `[/]`.
|
in square brackets, e.g. `[bold red]`, that style will apply until it is closed with a `[/]`.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
AnsiConsole.Write(new Markup("[bold yellow]Hello[/] [red]World![/]"));
|
AnsiConsole.Write(new Markup("[bold yellow]Hello[/] [red]World![/]"));
|
||||||
```
|
```
|
||||||
|
|
||||||
The `Markup` class implements `IRenderable` which means that you
|
The `Markup` class implements `IRenderable` which means that you
|
||||||
can use this in tables, grids, and panels. Most classes that support
|
can use this in tables, grids, and panels. Most classes that support
|
||||||
rendering of `IRenderable` also have overloads for rendering rich text.
|
rendering of `IRenderable` also have overloads for rendering rich text.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
var table = new Table();
|
var table = new Table();
|
||||||
table.AddColumn(new TableColumn(new Markup("[yellow]Foo[/]")));
|
table.AddColumn(new TableColumn(new Markup("[yellow]Foo[/]")));
|
||||||
table.AddColumn(new TableColumn("[blue]Bar[/]"));
|
table.AddColumn(new TableColumn("[blue]Bar[/]"));
|
||||||
AnsiConsole.Write(table);
|
AnsiConsole.Write(table);
|
||||||
```
|
```
|
||||||
|
|
||||||
## Convenience methods
|
## Convenience methods
|
||||||
|
|
||||||
There are also convenience methods on `AnsiConsole` that can be used
|
There are also convenience methods on `AnsiConsole` that can be used
|
||||||
to write markup text to the console without instantiating a new `Markup`
|
to write markup text to the console without instantiating a new `Markup`
|
||||||
instance.
|
instance.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
AnsiConsole.Markup("[underline green]Hello[/] ");
|
AnsiConsole.Markup("[underline green]Hello[/] ");
|
||||||
AnsiConsole.MarkupLine("[bold]World[/]");
|
AnsiConsole.MarkupLine("[bold]World[/]");
|
||||||
```
|
```
|
||||||
|
|
||||||
## Escaping format characters
|
## Escaping format characters
|
||||||
|
|
||||||
To output a `[` you use `[[`, and to output a `]` you use `]]`.
|
To output a `[` you use `[[`, and to output a `]` you use `]]`.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
AnsiConsole.Markup("[[Hello]] "); // [Hello]
|
AnsiConsole.Markup("[[Hello]] "); // [Hello]
|
||||||
AnsiConsole.Markup("[red][[World]][/]"); // [World]
|
AnsiConsole.Markup("[red][[World]][/]"); // [World]
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also use the `EscapeMarkup` extension method.
|
You can also use the `EscapeMarkup` extension method.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
AnsiConsole.Markup("[red]{0}[/]", "Hello [World]".EscapeMarkup());
|
AnsiConsole.Markup("[red]{0}[/]", "Hello [World]".EscapeMarkup());
|
||||||
```
|
```
|
||||||
You can also use the `Markup.Escape` method.
|
You can also use the `Markup.Escape` method.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
AnsiConsole.Markup("[red]{0}[/]", Markup.Escape("Hello [World]"));
|
AnsiConsole.Markup("[red]{0}[/]", Markup.Escape("Hello [World]"));
|
||||||
```
|
```
|
||||||
|
|
||||||
## Escaping Interpolated Strings
|
## Escaping Interpolated Strings
|
||||||
|
|
||||||
When working with interpolated strings, you can use the `MarkupInterpolated` and `MarkupLineInterpolated` methods to automatically escape the values in the interpolated string "holes".
|
When working with interpolated strings, you can use the `MarkupInterpolated` and `MarkupLineInterpolated` methods to automatically escape the values in the interpolated string "holes".
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
string hello = "Hello [World]";
|
string hello = "Hello [World]";
|
||||||
AnsiConsole.MarkupInterpolated($"[red]{hello}[/]");
|
AnsiConsole.MarkupInterpolated($"[red]{hello}[/]");
|
||||||
```
|
```
|
||||||
|
|
||||||
## Setting background color
|
## Setting background color
|
||||||
|
|
||||||
You can set the background color in markup by prefixing the color with `on`.
|
You can set the background color in markup by prefixing the color with `on`.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
AnsiConsole.Markup("[bold yellow on blue]Hello[/]");
|
AnsiConsole.Markup("[bold yellow on blue]Hello[/]");
|
||||||
AnsiConsole.Markup("[default on blue]World[/]");
|
AnsiConsole.Markup("[default on blue]World[/]");
|
||||||
```
|
```
|
||||||
|
|
||||||
## Rendering emojis
|
## Rendering emojis
|
||||||
|
|
||||||
To output an emoji as part of markup, you can use emoji shortcodes.
|
To output an emoji as part of markup, you can use emoji shortcodes.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
AnsiConsole.Markup("Hello :globe_showing_europe_africa:!");
|
AnsiConsole.Markup("Hello :globe_showing_europe_africa:!");
|
||||||
```
|
```
|
||||||
|
|
||||||
For a list of emoji, see the [Emojis](xref:emojis) appendix section.
|
For a list of emoji, see the [Emojis](xref:emojis) appendix section.
|
||||||
|
|
||||||
## Colors
|
## Colors
|
||||||
|
|
||||||
In the examples above, all colors were referenced by their name,
|
In the examples above, all colors were referenced by their name,
|
||||||
but you can also use the hex or rgb representation for colors in markdown.
|
but you can also use the hex or rgb representation for colors in markdown.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
AnsiConsole.Markup("[red]Foo[/] ");
|
AnsiConsole.Markup("[red]Foo[/] ");
|
||||||
AnsiConsole.Markup("[#ff0000]Bar[/] ");
|
AnsiConsole.Markup("[#ff0000]Bar[/] ");
|
||||||
AnsiConsole.Markup("[rgb(255,0,0)]Baz[/] ");
|
AnsiConsole.Markup("[rgb(255,0,0)]Baz[/] ");
|
||||||
```
|
```
|
||||||
|
|
||||||
For a list of colors, see the [Colors](xref:colors) appendix section.
|
For a list of colors, see the [Colors](xref:colors) appendix section.
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
To output a clickable link, you can use the `[link]` style.
|
To output a clickable link, you can use the `[link]` style.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
AnsiConsole.Markup("[link]https://spectreconsole.net[/]");
|
AnsiConsole.Markup("[link]https://spectreconsole.net[/]");
|
||||||
AnsiConsole.Markup("[link=https://spectreconsole.net]Spectre Console Documentation[/]");
|
AnsiConsole.Markup("[link=https://spectreconsole.net]Spectre Console Documentation[/]");
|
||||||
```
|
```
|
||||||
|
|
||||||
## Styles
|
## Styles
|
||||||
|
|
||||||
For a list of styles, see the [Styles](xref:styles) appendix section.
|
For a list of styles, see the [Styles](xref:styles) appendix section.
|
||||||
|
|||||||
@@ -63,22 +63,22 @@ What's the secret number? _
|
|||||||
|
|
||||||
```text
|
```text
|
||||||
Enter password: ************_
|
Enter password: ************_
|
||||||
```
|
```
|
||||||
|
|
||||||
## Masks
|
## Masks
|
||||||
|
|
||||||
<?# Example symbol="M:Prompt.Program.AskPasswordWithCustomMask" project="Prompt" /?>
|
<?# Example symbol="M:Prompt.Program.AskPasswordWithCustomMask" project="Prompt" /?>
|
||||||
|
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Enter password: ------------_
|
Enter password: ------------_
|
||||||
```
|
```
|
||||||
|
|
||||||
You can utilize a null character to completely hide input.
|
You can utilize a null character to completely hide input.
|
||||||
|
|
||||||
<?# Example symbol="M:Prompt.Program.AskPasswordWithNullMask" project="Prompt" /?>
|
<?# Example symbol="M:Prompt.Program.AskPasswordWithNullMask" project="Prompt" /?>
|
||||||
|
|
||||||
```text
|
```text
|
||||||
Enter password: _
|
Enter password: _
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,10 @@ to install the NuGet package.
|
|||||||
|
|
||||||
```text
|
```text
|
||||||
> dotnet add package Spectre.Console
|
> dotnet add package Spectre.Console
|
||||||
|
> dotnet add package Spectre.Console.Cli
|
||||||
```
|
```
|
||||||
|
|
||||||
After that you will need to reference the `Spectre.Console` namespace.
|
After that you will need to reference the `Spectre.Console` and `Spectre.Console.Cli` namespaces.
|
||||||
Once that is done, you can start using all the available features.
|
Once that is done, you can start using all the available features.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
|
|||||||
@@ -132,3 +132,13 @@ AnsiConsole.Write(new BreakdownChart()
|
|||||||
.AddItem(new Fruit("Mango", 3, Color.Orange4))
|
.AddItem(new Fruit("Mango", 3, Color.Orange4))
|
||||||
.AddItems(items));
|
.AddItems(items));
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Add value formatter to chart numbers
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
var chart = new BreakdownChart();
|
||||||
|
chart.UseValueFormater(value => value.ToString("N0"));
|
||||||
|
|
||||||
|
// This can be simplified as extension methods are chainable.
|
||||||
|
var chart = new BreakdownChart().UseValueFormatter(v => v.ToString("N0"));
|
||||||
|
```
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Title: Calendar
|
Title: Calendar
|
||||||
Order: 40
|
Order: 40
|
||||||
RedirectFrom: calendar
|
RedirectFrom: calendar
|
||||||
Description: "The **Calendar** is used to render a calendar to the terminal."
|
Description: "The **Calendar** is used to render a calendar to the terminal."
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ You can set the rule's title alignment.
|
|||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
var rule = new Rule("[red]Hello[/]");
|
var rule = new Rule("[red]Hello[/]");
|
||||||
rule.Alignment = Justify.Left;
|
rule.Justification = Justify.Left;
|
||||||
AnsiConsole.Write(rule);
|
AnsiConsole.Write(rule);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Statiq.App;
|
using Statiq.App;
|
||||||
using Statiq.Common;
|
using Statiq.Common;
|
||||||
using Statiq.Web;
|
using Statiq.Web;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Docs.Extensions
|
namespace Docs.Extensions
|
||||||
{
|
{
|
||||||
public static class StringExtensions
|
public static class StringExtensions
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Docs.Models
|
namespace Docs.Models
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using Docs.Utilities;
|
using Docs.Utilities;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Statiq.Common;
|
using Statiq.Common;
|
||||||
using Statiq.Web.GitHub;
|
using Statiq.Web.GitHub;
|
||||||
using Statiq.Web.Netlify;
|
using Statiq.Web.Netlify;
|
||||||
|
|
||||||
|
|||||||
@@ -1,119 +1,119 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.FileProviders;
|
using Microsoft.Extensions.FileProviders;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Playwright;
|
using Microsoft.Playwright;
|
||||||
using Statiq.Common;
|
using Statiq.Common;
|
||||||
using Statiq.Core;
|
using Statiq.Core;
|
||||||
using Statiq.Web;
|
using Statiq.Web;
|
||||||
using Statiq.Web.Modules;
|
using Statiq.Web.Modules;
|
||||||
using Statiq.Web.Pipelines;
|
using Statiq.Web.Pipelines;
|
||||||
|
|
||||||
namespace Docs.Pipelines
|
namespace Docs.Pipelines
|
||||||
{
|
{
|
||||||
public class SocialImages : Pipeline
|
public class SocialImages : Pipeline
|
||||||
{
|
{
|
||||||
public SocialImages()
|
public SocialImages()
|
||||||
{
|
{
|
||||||
Dependencies.AddRange(nameof(Inputs));
|
Dependencies.AddRange(nameof(Inputs));
|
||||||
|
|
||||||
ProcessModules = new ModuleList
|
ProcessModules = new ModuleList
|
||||||
{
|
{
|
||||||
new GetPipelineDocuments(ContentType.Content),
|
new GetPipelineDocuments(ContentType.Content),
|
||||||
|
|
||||||
// Filter to non-archive content
|
// Filter to non-archive content
|
||||||
new FilterDocuments(Config.FromDocument(doc => !Archives.IsArchive(doc))),
|
new FilterDocuments(Config.FromDocument(doc => !Archives.IsArchive(doc))),
|
||||||
|
|
||||||
// Process the content
|
// Process the content
|
||||||
new CacheDocuments
|
new CacheDocuments
|
||||||
{
|
{
|
||||||
new AddTitle(),
|
new AddTitle(),
|
||||||
new SetDestination(true),
|
new SetDestination(true),
|
||||||
new ExecuteIf(Config.FromSetting(WebKeys.OptimizeContentFileNames, true))
|
new ExecuteIf(Config.FromSetting(WebKeys.OptimizeContentFileNames, true))
|
||||||
{
|
{
|
||||||
new OptimizeFileName()
|
new OptimizeFileName()
|
||||||
},
|
},
|
||||||
new GenerateSocialImage(),
|
new GenerateSocialImage(),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
OutputModules = new ModuleList { new WriteFiles() };
|
OutputModules = new ModuleList { new WriteFiles() };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class GenerateSocialImage : ParallelModule
|
class GenerateSocialImage : ParallelModule
|
||||||
{
|
{
|
||||||
private IPlaywright _playwright;
|
private IPlaywright _playwright;
|
||||||
private IBrowser _browser;
|
private IBrowser _browser;
|
||||||
private WebApplication _app;
|
private WebApplication _app;
|
||||||
private IBrowserContext _context;
|
private IBrowserContext _context;
|
||||||
|
|
||||||
protected override async Task BeforeExecutionAsync(IExecutionContext context)
|
protected override async Task BeforeExecutionAsync(IExecutionContext context)
|
||||||
{
|
{
|
||||||
var builder = WebApplication.CreateBuilder();
|
var builder = WebApplication.CreateBuilder();
|
||||||
builder.Logging.ClearProviders();
|
builder.Logging.ClearProviders();
|
||||||
|
|
||||||
builder.Services
|
builder.Services
|
||||||
.AddRazorPages()
|
.AddRazorPages()
|
||||||
.WithRazorPagesRoot("/src/SocialCards/");
|
.WithRazorPagesRoot("/src/SocialCards/");
|
||||||
|
|
||||||
_app = builder.Build();
|
_app = builder.Build();
|
||||||
_app.MapRazorPages();
|
_app.MapRazorPages();
|
||||||
_app.UseStaticFiles(new StaticFileOptions
|
_app.UseStaticFiles(new StaticFileOptions
|
||||||
{
|
{
|
||||||
FileProvider = new PhysicalFileProvider(
|
FileProvider = new PhysicalFileProvider(
|
||||||
Path.Combine(builder.Environment.ContentRootPath, "src/SocialCards")),
|
Path.Combine(builder.Environment.ContentRootPath, "src/SocialCards")),
|
||||||
RequestPath = "/static"
|
RequestPath = "/static"
|
||||||
});
|
});
|
||||||
|
|
||||||
await _app.StartAsync().ConfigureAwait(false);
|
await _app.StartAsync().ConfigureAwait(false);
|
||||||
|
|
||||||
_playwright = await Playwright.CreateAsync().ConfigureAwait(false);
|
_playwright = await Playwright.CreateAsync().ConfigureAwait(false);
|
||||||
_browser = await _playwright.Chromium.LaunchAsync().ConfigureAwait(false);
|
_browser = await _playwright.Chromium.LaunchAsync().ConfigureAwait(false);
|
||||||
_context = await _browser.NewContextAsync(new BrowserNewContextOptions {
|
_context = await _browser.NewContextAsync(new BrowserNewContextOptions {
|
||||||
ViewportSize = new ViewportSize { Width = 1200, Height = 618 },
|
ViewportSize = new ViewportSize { Width = 1200, Height = 618 },
|
||||||
}).ConfigureAwait(false);
|
}).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task FinallyAsync(IExecutionContext context)
|
protected override async Task FinallyAsync(IExecutionContext context)
|
||||||
{
|
{
|
||||||
await _context.DisposeAsync().ConfigureAwait(false);
|
await _context.DisposeAsync().ConfigureAwait(false);
|
||||||
await _browser.DisposeAsync().ConfigureAwait(false);
|
await _browser.DisposeAsync().ConfigureAwait(false);
|
||||||
_playwright.Dispose();
|
_playwright.Dispose();
|
||||||
await _app.DisposeAsync().ConfigureAwait(false);
|
await _app.DisposeAsync().ConfigureAwait(false);
|
||||||
await base.FinallyAsync(context);
|
await base.FinallyAsync(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task<IEnumerable<IDocument>> ExecuteInputAsync(IDocument input, IExecutionContext context)
|
protected override async Task<IEnumerable<IDocument>> ExecuteInputAsync(IDocument input, IExecutionContext context)
|
||||||
{
|
{
|
||||||
var url = _app.Urls.FirstOrDefault(u => u.StartsWith("http://"));
|
var url = _app.Urls.FirstOrDefault(u => u.StartsWith("http://"));
|
||||||
var page = await _context.NewPageAsync().ConfigureAwait(false);
|
var page = await _context.NewPageAsync().ConfigureAwait(false);
|
||||||
|
|
||||||
var title = input.GetString("Title");
|
var title = input.GetString("Title");
|
||||||
var description = input.GetString("Description");
|
var description = input.GetString("Description");
|
||||||
var highlights = input.GetList<string>("Highlights") ?? Array.Empty<string>();
|
var highlights = input.GetList<string>("Highlights") ?? Array.Empty<string>();
|
||||||
|
|
||||||
await page.GotoAsync($"{url}/?title={title}&desc={description}&highlights={string.Join("||", highlights)}");
|
await page.GotoAsync($"{url}/?title={title}&desc={description}&highlights={string.Join("||", highlights)}");
|
||||||
|
|
||||||
// This will not just wait for the page to load over the network, but it'll also give
|
// This will not just wait for the page to load over the network, but it'll also give
|
||||||
// chrome a chance to complete rendering of the fonts while the wait timeout completes.
|
// chrome a chance to complete rendering of the fonts while the wait timeout completes.
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle).ConfigureAwait(false);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle).ConfigureAwait(false);
|
||||||
var bytes = await page.ScreenshotAsync().ConfigureAwait(false);
|
var bytes = await page.ScreenshotAsync().ConfigureAwait(false);
|
||||||
await page.CloseAsync().ConfigureAwait(false);
|
await page.CloseAsync().ConfigureAwait(false);
|
||||||
|
|
||||||
var destination = input.Destination.InsertSuffix("-social").ChangeExtension("png");
|
var destination = input.Destination.InsertSuffix("-social").ChangeExtension("png");
|
||||||
var doc = context.CreateDocument(
|
var doc = context.CreateDocument(
|
||||||
input.Source,
|
input.Source,
|
||||||
destination,
|
destination,
|
||||||
new MetadataItems { { "DocId", input.Id }},
|
new MetadataItems { { "DocId", input.Id }},
|
||||||
context.GetContentProvider(bytes));
|
context.GetContentProvider(bytes));
|
||||||
|
|
||||||
return new[] { doc };
|
return new[] { doc };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Docs.Extensions;
|
using Docs.Extensions;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<div id="console">
|
<div id="console">
|
||||||
<div class="line"><span style="color:var(--brightBlack)">╭─</span><span style="color:var(--folder)"></span><span style="background-color:var(--folder);color:var(--black)"> ~/spectre.console</span><span style="color:var(--folder);background-color:var(--dotnet)"></span><span style="background-color:var(--blue)"> .NET 7.0 </span><span style="color:var(--dotnet);background-color:var(--git)"></span><span style="background-color:var(--git);color:var(--background)">  main </span><span style="color:var(--git)"></span></div>
|
<div class="line"><span style="color:var(--brightBlack)">╭─</span><span style="color:var(--folder)"></span><span style="background-color:var(--folder);color:var(--black)"> ~/spectre.console</span><span style="color:var(--folder);background-color:var(--dotnet)"></span><span style="background-color:var(--blue)"> .NET 8.0 </span><span style="color:var(--dotnet);background-color:var(--git)"></span><span style="background-color:var(--git);color:var(--background)">  main </span><span style="color:var(--git)"></span></div>
|
||||||
<div class="line"><span style="color:var(--brightBlack)">╰─</span> dotnet run</div>
|
<div class="line"><span style="color:var(--brightBlack)">╰─</span> dotnet run</div>
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
<div class="line">╭────────────────────────────────────────────────────────╮</div>
|
<div class="line">╭────────────────────────────────────────────────────────╮</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|||||||
@@ -3,22 +3,22 @@
|
|||||||
"isRoot": true,
|
"isRoot": true,
|
||||||
"tools": {
|
"tools": {
|
||||||
"cake.tool": {
|
"cake.tool": {
|
||||||
"version": "3.0.0",
|
"version": "4.0.0",
|
||||||
"commands": [
|
"commands": [
|
||||||
"dotnet-cake"
|
"dotnet-cake"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"gpr": {
|
|
||||||
"version": "0.1.281",
|
|
||||||
"commands": [
|
|
||||||
"gpr"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"dotnet-example": {
|
"dotnet-example": {
|
||||||
"version": "2.0.0",
|
"version": "3.1.0",
|
||||||
"commands": [
|
"commands": [
|
||||||
"dotnet-example"
|
"dotnet-example"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"verify.tool": {
|
||||||
|
"version": "0.6.0",
|
||||||
|
"commands": [
|
||||||
|
"dotnet-verify"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,7 +9,7 @@ public static partial class Program
|
|||||||
{
|
{
|
||||||
[CommandOption("--count")]
|
[CommandOption("--count")]
|
||||||
[Description("The number of bars to print")]
|
[Description("The number of bars to print")]
|
||||||
[DefaultValue(1)]
|
[DefaultValue(3)]
|
||||||
public int Count { get; set; }
|
public int Count { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<ExampleName>Delegates</ExampleName>
|
<ExampleName>Delegates</ExampleName>
|
||||||
<ExampleDescription>Demonstrates how to specify commands as delegates.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to specify commands as delegates.</ExampleDescription>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
using Spectre.Console;
|
using Spectre.Console;
|
||||||
using Spectre.Console.Cli;
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
@@ -14,7 +15,13 @@ public static partial class Program
|
|||||||
.WithDescription("Foos the bars");
|
.WithDescription("Foos the bars");
|
||||||
|
|
||||||
config.AddDelegate<BarSettings>("bar", Bar)
|
config.AddDelegate<BarSettings>("bar", Bar)
|
||||||
.WithDescription("Bars the foos"); ;
|
.WithDescription("Bars the foos");
|
||||||
|
|
||||||
|
config.AddAsyncDelegate("fooAsync", FooAsync)
|
||||||
|
.WithDescription("Foos the bars asynchronously");
|
||||||
|
|
||||||
|
config.AddAsyncDelegate<BarSettings>("barAsync", BarAsync)
|
||||||
|
.WithDescription("Bars the foos asynchronously");
|
||||||
});
|
});
|
||||||
|
|
||||||
return app.Run(args);
|
return app.Run(args);
|
||||||
@@ -35,4 +42,20 @@ public static partial class Program
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Task<int> FooAsync(CommandContext context)
|
||||||
|
{
|
||||||
|
AnsiConsole.WriteLine("Foo");
|
||||||
|
return Task.FromResult(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Task<int> BarAsync(CommandContext context, BarSettings settings)
|
||||||
|
{
|
||||||
|
for (var index = 0; index < settings.Count; index++)
|
||||||
|
{
|
||||||
|
AnsiConsole.WriteLine("Bar");
|
||||||
|
}
|
||||||
|
|
||||||
|
return Task.FromResult(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<ExampleName>Demo</ExampleName>
|
<ExampleName>Demo</ExampleName>
|
||||||
<ExampleDescription>Demonstrates the most common use cases of Spectre.Cli.</ExampleDescription>
|
<ExampleDescription>Demonstrates the most common use cases of Spectre.Cli.</ExampleDescription>
|
||||||
|
|||||||
@@ -15,24 +15,24 @@ public static class Program
|
|||||||
{
|
{
|
||||||
config.SetApplicationName("fake-dotnet");
|
config.SetApplicationName("fake-dotnet");
|
||||||
config.ValidateExamples();
|
config.ValidateExamples();
|
||||||
config.AddExample(new[] { "run", "--no-build" });
|
config.AddExample("run", "--no-build");
|
||||||
|
|
||||||
// Run
|
// Run
|
||||||
config.AddCommand<RunCommand>("run");
|
config.AddCommand<RunCommand>("run");
|
||||||
|
|
||||||
// Add
|
// Add
|
||||||
config.AddBranch<AddSettings>("add", add =>
|
config.AddBranch<AddSettings>("add", add =>
|
||||||
{
|
{
|
||||||
add.SetDescription("Add a package or reference to a .NET project");
|
add.SetDescription("Add a package or reference to a .NET project");
|
||||||
add.AddCommand<AddPackageCommand>("package");
|
add.AddCommand<AddPackageCommand>("package");
|
||||||
add.AddCommand<AddReferenceCommand>("reference");
|
add.AddCommand<AddReferenceCommand>("reference");
|
||||||
});
|
});
|
||||||
|
|
||||||
// Serve
|
// Serve
|
||||||
config.AddCommand<ServeCommand>("serve")
|
config.AddCommand<ServeCommand>("serve")
|
||||||
.WithExample(new[] { "serve", "-o", "firefox" })
|
.WithExample("serve", "-o", "firefox")
|
||||||
.WithExample(new[] { "serve", "--port", "80", "-o", "firefox" });
|
.WithExample("serve", "--port", "80", "-o", "firefox");
|
||||||
});
|
});
|
||||||
|
|
||||||
return app.Run(args);
|
return app.Run(args);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<ExampleName>Dynamic</ExampleName>
|
<ExampleName>Dynamic</ExampleName>
|
||||||
<ExampleDescription>Demonstrates how to define dynamic commands.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to define dynamic commands.</ExampleDescription>
|
||||||
|
|||||||
30
examples/Cli/Help/CustomHelpProvider.cs
Normal file
30
examples/Cli/Help/CustomHelpProvider.cs
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
using System.Linq;
|
||||||
|
using Spectre.Console;
|
||||||
|
using Spectre.Console.Cli;
|
||||||
|
using Spectre.Console.Cli.Help;
|
||||||
|
using Spectre.Console.Rendering;
|
||||||
|
|
||||||
|
namespace Help;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Example showing how to extend the built-in Spectre.Console help provider
|
||||||
|
/// by rendering a custom banner at the top of the help information
|
||||||
|
/// </summary>
|
||||||
|
internal class CustomHelpProvider : HelpProvider
|
||||||
|
{
|
||||||
|
public CustomHelpProvider(ICommandAppSettings settings)
|
||||||
|
: base(settings)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IEnumerable<IRenderable> GetHeader(ICommandModel model, ICommandInfo? command)
|
||||||
|
{
|
||||||
|
return new[]
|
||||||
|
{
|
||||||
|
new Text("--------------------------------------"), Text.NewLine,
|
||||||
|
new Text("--- CUSTOM HELP PROVIDER ---"), Text.NewLine,
|
||||||
|
new Text("--------------------------------------"), Text.NewLine,
|
||||||
|
Text.NewLine,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
20
examples/Cli/Help/DefaultCommand.cs
Normal file
20
examples/Cli/Help/DefaultCommand.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
using Spectre.Console;
|
||||||
|
using Spectre.Console.Cli;
|
||||||
|
|
||||||
|
namespace Help;
|
||||||
|
|
||||||
|
public sealed class DefaultCommand : Command
|
||||||
|
{
|
||||||
|
private IAnsiConsole _console;
|
||||||
|
|
||||||
|
public DefaultCommand(IAnsiConsole console)
|
||||||
|
{
|
||||||
|
_console = console;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int Execute(CommandContext context)
|
||||||
|
{
|
||||||
|
_console.WriteLine("Hello world");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
18
examples/Cli/Help/Help.csproj
Normal file
18
examples/Cli/Help/Help.csproj
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ExampleName>Help</ExampleName>
|
||||||
|
<ExampleDescription>Demonstrates how to extend the built-in Spectre.Console help provider to render a custom banner at the top of the help information.</ExampleDescription>
|
||||||
|
<ExampleGroup>Cli</ExampleGroup>
|
||||||
|
<ExampleVisible>false</ExampleVisible>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\Shared\Shared.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
23
examples/Cli/Help/Program.cs
Normal file
23
examples/Cli/Help/Program.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
using Spectre.Console.Cli;
|
||||||
|
using Spectre.Console.Cli.Help;
|
||||||
|
|
||||||
|
namespace Help;
|
||||||
|
|
||||||
|
public static class Program
|
||||||
|
{
|
||||||
|
public static int Main(string[] args)
|
||||||
|
{
|
||||||
|
var app = new CommandApp<DefaultCommand>();
|
||||||
|
|
||||||
|
app.Configure(config =>
|
||||||
|
{
|
||||||
|
// Register the custom help provider
|
||||||
|
config.SetHelpProvider(new CustomHelpProvider(config.Settings));
|
||||||
|
|
||||||
|
// Render an unstyled help text for maximum accessibility
|
||||||
|
config.Settings.HelpProviderStyles = null;
|
||||||
|
});
|
||||||
|
|
||||||
|
return app.Run(args);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<ExampleName>Injection</ExampleName>
|
<ExampleName>Injection</ExampleName>
|
||||||
<ExampleDescription>Demonstrates how to use dependency injection with Spectre.Cli.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to use dependency injection with Spectre.Cli.</ExampleDescription>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<ExampleName>Logging</ExampleName>
|
<ExampleName>Logging</ExampleName>
|
||||||
<ExampleDescription>Demonstrates how to dynamically configure Serilog for logging using parameters from a command.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to dynamically configure Serilog for logging using parameters from a command.</ExampleDescription>
|
||||||
@@ -12,9 +12,9 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
||||||
<PackageReference Include="Serilog" Version="2.11.0" />
|
<PackageReference Include="Serilog" Version="3.1.1" />
|
||||||
<PackageReference Include="Serilog.Extensions.Logging" Version="3.1.0" />
|
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.Map" Version="1.0.2" />
|
<PackageReference Include="Serilog.Sinks.Map" Version="1.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Screens</ExampleTitle>
|
<ExampleTitle>Screens</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to use alternate screens.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to use alternate screens.</ExampleDescription>
|
||||||
<ExampleGroup>Widgets</ExampleGroup>
|
<ExampleGroup>Widgets</ExampleGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Borders</ExampleTitle>
|
<ExampleTitle>Borders</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates the different kind of borders.</ExampleDescription>
|
<ExampleDescription>Demonstrates the different kind of borders.</ExampleDescription>
|
||||||
<ExampleGroup>Widgets</ExampleGroup>
|
<ExampleGroup>Widgets</ExampleGroup>
|
||||||
|
|||||||
@@ -20,21 +20,22 @@ public static class Program
|
|||||||
{
|
{
|
||||||
static IRenderable CreatePanel(string name, BoxBorder border)
|
static IRenderable CreatePanel(string name, BoxBorder border)
|
||||||
{
|
{
|
||||||
return new Panel($"This is a panel with\nthe [yellow]{name}[/] border.")
|
return
|
||||||
.Header($" [blue]{name}[/] ", Justify.Center)
|
new Panel($"This is a panel with\nthe [yellow]{name}[/] border.")
|
||||||
.Border(border)
|
.Header($" [blue]{name}[/] ", Justify.Center)
|
||||||
.BorderStyle(Style.Parse("grey"));
|
.Border(border)
|
||||||
|
.BorderStyle(Style.Parse("grey"));
|
||||||
}
|
}
|
||||||
|
|
||||||
var items = new[]
|
var items = new[]
|
||||||
{
|
{
|
||||||
CreatePanel("Ascii", BoxBorder.Ascii),
|
CreatePanel("Ascii", BoxBorder.Ascii),
|
||||||
CreatePanel("Square", BoxBorder.Square),
|
CreatePanel("Square", BoxBorder.Square),
|
||||||
CreatePanel("Rounded", BoxBorder.Rounded),
|
CreatePanel("Rounded", BoxBorder.Rounded),
|
||||||
CreatePanel("Heavy", BoxBorder.Heavy),
|
CreatePanel("Heavy", BoxBorder.Heavy),
|
||||||
CreatePanel("Double", BoxBorder.Double),
|
CreatePanel("Double", BoxBorder.Double),
|
||||||
CreatePanel("None", BoxBorder.None),
|
CreatePanel("None", BoxBorder.None),
|
||||||
};
|
};
|
||||||
|
|
||||||
AnsiConsole.Write(
|
AnsiConsole.Write(
|
||||||
new Padder(
|
new Padder(
|
||||||
@@ -47,6 +48,7 @@ public static class Program
|
|||||||
static IRenderable CreateTable(string name, TableBorder border)
|
static IRenderable CreateTable(string name, TableBorder border)
|
||||||
{
|
{
|
||||||
var table = new Table().Border(border);
|
var table = new Table().Border(border);
|
||||||
|
table.ShowRowSeparators();
|
||||||
table.AddColumn("[yellow]Header 1[/]", c => c.Footer("[grey]Footer 1[/]"));
|
table.AddColumn("[yellow]Header 1[/]", c => c.Footer("[grey]Footer 1[/]"));
|
||||||
table.AddColumn("[yellow]Header 2[/]", col => col.Footer("[grey]Footer 2[/]").RightAligned());
|
table.AddColumn("[yellow]Header 2[/]", col => col.Footer("[grey]Footer 2[/]").RightAligned());
|
||||||
table.AddRow("Cell", "Cell");
|
table.AddRow("Cell", "Cell");
|
||||||
@@ -54,29 +56,23 @@ public static class Program
|
|||||||
|
|
||||||
return new Panel(table)
|
return new Panel(table)
|
||||||
.Header($" [blue]{name}[/] ", Justify.Center)
|
.Header($" [blue]{name}[/] ", Justify.Center)
|
||||||
|
.PadBottom(1)
|
||||||
.NoBorder();
|
.NoBorder();
|
||||||
}
|
}
|
||||||
|
|
||||||
var items = new[]
|
var items = new[]
|
||||||
{
|
{
|
||||||
CreateTable("Ascii", TableBorder.Ascii),
|
CreateTable("Ascii", TableBorder.Ascii), CreateTable("Ascii2", TableBorder.Ascii2),
|
||||||
CreateTable("Ascii2", TableBorder.Ascii2),
|
CreateTable("AsciiDoubleHead", TableBorder.AsciiDoubleHead),
|
||||||
CreateTable("AsciiDoubleHead", TableBorder.AsciiDoubleHead),
|
CreateTable("Horizontal", TableBorder.Horizontal), CreateTable("Simple", TableBorder.Simple),
|
||||||
CreateTable("Horizontal", TableBorder.Horizontal),
|
CreateTable("SimpleHeavy", TableBorder.SimpleHeavy), CreateTable("Minimal", TableBorder.Minimal),
|
||||||
CreateTable("Simple", TableBorder.Simple),
|
CreateTable("MinimalHeavyHead", TableBorder.MinimalHeavyHead),
|
||||||
CreateTable("SimpleHeavy", TableBorder.SimpleHeavy),
|
CreateTable("MinimalDoubleHead", TableBorder.MinimalDoubleHead),
|
||||||
CreateTable("Minimal", TableBorder.Minimal),
|
CreateTable("Square", TableBorder.Square), CreateTable("Rounded", TableBorder.Rounded),
|
||||||
CreateTable("MinimalHeavyHead", TableBorder.MinimalHeavyHead),
|
CreateTable("Heavy", TableBorder.Heavy), CreateTable("HeavyEdge", TableBorder.HeavyEdge),
|
||||||
CreateTable("MinimalDoubleHead", TableBorder.MinimalDoubleHead),
|
CreateTable("HeavyHead", TableBorder.HeavyHead), CreateTable("Double", TableBorder.Double),
|
||||||
CreateTable("Square", TableBorder.Square),
|
CreateTable("DoubleEdge", TableBorder.DoubleEdge), CreateTable("Markdown", TableBorder.Markdown),
|
||||||
CreateTable("Rounded", TableBorder.Rounded),
|
};
|
||||||
CreateTable("Heavy", TableBorder.Heavy),
|
|
||||||
CreateTable("HeavyEdge", TableBorder.HeavyEdge),
|
|
||||||
CreateTable("HeavyHead", TableBorder.HeavyHead),
|
|
||||||
CreateTable("Double", TableBorder.Double),
|
|
||||||
CreateTable("DoubleEdge", TableBorder.DoubleEdge),
|
|
||||||
CreateTable("Markdown", TableBorder.Markdown),
|
|
||||||
};
|
|
||||||
|
|
||||||
AnsiConsole.Write(new Columns(items).Collapse());
|
AnsiConsole.Write(new Columns(items).Collapse());
|
||||||
}
|
}
|
||||||
@@ -87,4 +83,4 @@ public static class Program
|
|||||||
AnsiConsole.Write(new Rule($"[white bold]{title}[/]").RuleStyle("grey").LeftJustified());
|
AnsiConsole.Write(new Rule($"[white bold]{title}[/]").RuleStyle("grey").LeftJustified());
|
||||||
AnsiConsole.WriteLine();
|
AnsiConsole.WriteLine();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Calendars</ExampleTitle>
|
<ExampleTitle>Calendars</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to render calendars.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to render calendars.</ExampleDescription>
|
||||||
<ExampleGroup>Widgets</ExampleGroup>
|
<ExampleGroup>Widgets</ExampleGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Canvas</ExampleTitle>
|
<ExampleTitle>Canvas</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to render pixels and images.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to render pixels and images.</ExampleDescription>
|
||||||
<ExampleGroup>Widgets</ExampleGroup>
|
<ExampleGroup>Widgets</ExampleGroup>
|
||||||
|
|||||||
@@ -1,86 +0,0 @@
|
|||||||
/*
|
|
||||||
Ported from: https://rosettacode.org/wiki/Mandelbrot_set#C.23
|
|
||||||
Licensed under GNU Free Documentation License 1.2
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using Spectre.Console;
|
|
||||||
|
|
||||||
namespace Canvas;
|
|
||||||
|
|
||||||
public static class Mandelbrot
|
|
||||||
{
|
|
||||||
private const double MaxValueExtent = 2.0;
|
|
||||||
|
|
||||||
private struct ComplexNumber
|
|
||||||
{
|
|
||||||
public double Real { get; }
|
|
||||||
public double Imaginary { get; }
|
|
||||||
|
|
||||||
public ComplexNumber(double real, double imaginary)
|
|
||||||
{
|
|
||||||
Real = real;
|
|
||||||
Imaginary = imaginary;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ComplexNumber operator +(ComplexNumber x, ComplexNumber y)
|
|
||||||
{
|
|
||||||
return new ComplexNumber(x.Real + y.Real, x.Imaginary + y.Imaginary);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ComplexNumber operator *(ComplexNumber x, ComplexNumber y)
|
|
||||||
{
|
|
||||||
return new ComplexNumber(x.Real * y.Real - x.Imaginary * y.Imaginary,
|
|
||||||
x.Real * y.Imaginary + x.Imaginary * y.Real);
|
|
||||||
}
|
|
||||||
|
|
||||||
public double Abs()
|
|
||||||
{
|
|
||||||
return Real * Real + Imaginary * Imaginary;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Spectre.Console.Canvas Generate(int width, int height)
|
|
||||||
{
|
|
||||||
var canvas = new Spectre.Console.Canvas(width, height);
|
|
||||||
|
|
||||||
var scale = 2 * MaxValueExtent / Math.Min(canvas.Width, canvas.Height);
|
|
||||||
for (var i = 0; i < canvas.Height; i++)
|
|
||||||
{
|
|
||||||
var y = (canvas.Height / 2 - i) * scale;
|
|
||||||
for (var j = 0; j < canvas.Width; j++)
|
|
||||||
{
|
|
||||||
var x = (j - canvas.Width / 2) * scale;
|
|
||||||
var value = Calculate(new ComplexNumber(x, y));
|
|
||||||
canvas.SetPixel(j, i, GetColor(value));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return canvas;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static double Calculate(ComplexNumber c)
|
|
||||||
{
|
|
||||||
const int MaxIterations = 1000;
|
|
||||||
const double MaxNorm = MaxValueExtent * MaxValueExtent;
|
|
||||||
|
|
||||||
var iteration = 0;
|
|
||||||
var z = new ComplexNumber();
|
|
||||||
do
|
|
||||||
{
|
|
||||||
z = z * z + c;
|
|
||||||
iteration++;
|
|
||||||
} while (z.Abs() < MaxNorm && iteration < MaxIterations);
|
|
||||||
|
|
||||||
return iteration < MaxIterations
|
|
||||||
? (double)iteration / MaxIterations
|
|
||||||
: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Color GetColor(double value)
|
|
||||||
{
|
|
||||||
const double MaxColor = 256;
|
|
||||||
const double ContrastValue = 0.2;
|
|
||||||
return new Color(0, 0, (byte)(MaxColor * Math.Pow(value, ContrastValue)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -10,10 +10,6 @@ public static class Program
|
|||||||
{
|
{
|
||||||
public static void Main()
|
public static void Main()
|
||||||
{
|
{
|
||||||
// Draw a mandelbrot set using a Canvas
|
|
||||||
var mandelbrot = Mandelbrot.Generate(32, 32);
|
|
||||||
Render(mandelbrot, "Mandelbrot");
|
|
||||||
|
|
||||||
// Draw an image using CanvasImage powered by ImageSharp.
|
// Draw an image using CanvasImage powered by ImageSharp.
|
||||||
// This requires the "Spectre.Console.ImageSharp" NuGet package.
|
// This requires the "Spectre.Console.ImageSharp" NuGet package.
|
||||||
var image = new CanvasImage("cake.png");
|
var image = new CanvasImage("cake.png");
|
||||||
@@ -21,7 +17,7 @@ public static class Program
|
|||||||
image.MaxWidth(16);
|
image.MaxWidth(16);
|
||||||
Render(image, "Image from file (16 wide)");
|
Render(image, "Image from file (16 wide)");
|
||||||
|
|
||||||
// Draw image again, but without render width
|
// Draw image again, but without max width
|
||||||
image.NoMaxWidth();
|
image.NoMaxWidth();
|
||||||
image.Mutate(ctx => ctx.Grayscale().Rotate(-45).EntropyCrop());
|
image.Mutate(ctx => ctx.Grayscale().Rotate(-45).EntropyCrop());
|
||||||
Render(image, "Image from file (fit, greyscale, rotated)");
|
Render(image, "Image from file (fit, greyscale, rotated)");
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Charts</ExampleTitle>
|
<ExampleTitle>Charts</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to render charts in a console.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to render charts in a console.</ExampleDescription>
|
||||||
<ExampleGroup>Widgets</ExampleGroup>
|
<ExampleGroup>Widgets</ExampleGroup>
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ public static class Program
|
|||||||
.FullSize()
|
.FullSize()
|
||||||
.Width(60)
|
.Width(60)
|
||||||
.ShowPercentage()
|
.ShowPercentage()
|
||||||
|
.WithValueColor(Color.Orange1)
|
||||||
.AddItem("SCSS", 37, Color.Red)
|
.AddItem("SCSS", 37, Color.Red)
|
||||||
.AddItem("HTML", 28.3, Color.Blue)
|
.AddItem("HTML", 28.3, Color.Blue)
|
||||||
.AddItem("C#", 22.6, Color.Green)
|
.AddItem("C#", 22.6, Color.Green)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Colors</ExampleTitle>
|
<ExampleTitle>Colors</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to use [yellow]c[/][red]o[/][green]l[/][blue]o[/][aqua]r[/][lime]s[/] in the console.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to use [yellow]c[/][red]o[/][green]l[/][blue]o[/][aqua]r[/][lime]s[/] in the console.</ExampleDescription>
|
||||||
<ExampleGroup>Misc</ExampleGroup>
|
<ExampleGroup>Misc</ExampleGroup>
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Columns</ExampleTitle>
|
<ExampleTitle>Columns</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to render data into columns.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to render data into columns.</ExampleDescription>
|
||||||
<ExampleGroup>Widgets</ExampleGroup>
|
<ExampleGroup>Widgets</ExampleGroup>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Cursor</ExampleTitle>
|
<ExampleTitle>Cursor</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to move the cursor.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to move the cursor.</ExampleDescription>
|
||||||
<ExampleGroup>Misc</ExampleGroup>
|
<ExampleGroup>Misc</ExampleGroup>
|
||||||
|
|||||||
15
examples/Console/Decorations/Decorations.csproj
Normal file
15
examples/Console/Decorations/Decorations.csproj
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ExampleTitle>Decorations</ExampleTitle>
|
||||||
|
<ExampleDescription>Demonstrates how to [italic]use[/] [bold]decorations[/] [dim]in[/] the console.</ExampleDescription>
|
||||||
|
<ExampleGroup>Misc</ExampleGroup>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\Shared\Shared.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
29
examples/Console/Decorations/Program.cs
Normal file
29
examples/Console/Decorations/Program.cs
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
using Spectre.Console;
|
||||||
|
|
||||||
|
namespace Colors;
|
||||||
|
|
||||||
|
public static class Program
|
||||||
|
{
|
||||||
|
public static void Main()
|
||||||
|
{
|
||||||
|
AnsiConsole.ResetDecoration();
|
||||||
|
AnsiConsole.WriteLine();
|
||||||
|
|
||||||
|
if (AnsiConsole.Profile.Capabilities.Ansi)
|
||||||
|
{
|
||||||
|
AnsiConsole.Write(new Rule("[bold green]ANSI Decorations[/]"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AnsiConsole.Write(new Rule("[bold red]Legacy Decorations (unsupported)[/]"));
|
||||||
|
}
|
||||||
|
|
||||||
|
var decorations = System.Enum.GetValues(typeof(Decoration));
|
||||||
|
foreach (var decoration in decorations)
|
||||||
|
{
|
||||||
|
var name = System.Enum.GetName(typeof(Decoration),decoration);
|
||||||
|
AnsiConsole.Write(name + ": ");
|
||||||
|
AnsiConsole.Write(new Markup(name+"\n", new Style(decoration: (Decoration)decoration)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Emojis</ExampleTitle>
|
<ExampleTitle>Emojis</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to render emojis.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to render emojis.</ExampleDescription>
|
||||||
<ExampleGroup>Misc</ExampleGroup>
|
<ExampleGroup>Misc</ExampleGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Exceptions</ExampleTitle>
|
<ExampleTitle>Exceptions</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to render formatted exceptions.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to render formatted exceptions.</ExampleDescription>
|
||||||
<ExampleGroup>Misc</ExampleGroup>
|
<ExampleGroup>Misc</ExampleGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Figlet</ExampleTitle>
|
<ExampleTitle>Figlet</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to render FIGlet text.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to render FIGlet text.</ExampleDescription>
|
||||||
<ExampleGroup>Widgets</ExampleGroup>
|
<ExampleGroup>Widgets</ExampleGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Grids</ExampleTitle>
|
<ExampleTitle>Grids</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to render grids in a console.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to render grids in a console.</ExampleDescription>
|
||||||
<ExampleGroup>Widgets</ExampleGroup>
|
<ExampleGroup>Widgets</ExampleGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Info</ExampleTitle>
|
<ExampleTitle>Info</ExampleTitle>
|
||||||
<ExampleDescription>Displays the capabilities of the current console.</ExampleDescription>
|
<ExampleDescription>Displays the capabilities of the current console.</ExampleDescription>
|
||||||
<ExampleGroup>Misc</ExampleGroup>
|
<ExampleGroup>Misc</ExampleGroup>
|
||||||
|
|||||||
@@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Json</ExampleTitle>
|
<ExampleTitle>Json</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to print syntax highlighted JSON.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to print syntax highlighted JSON.</ExampleDescription>
|
||||||
<ExampleGroup>Widgets</ExampleGroup>
|
<ExampleGroup>Widgets</ExampleGroup>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\Shared\Shared.csproj" />
|
|
||||||
<ProjectReference Include="..\..\..\src\Spectre.Console.Json\Spectre.Console.Json.csproj" />
|
<ProjectReference Include="..\..\..\src\Spectre.Console.Json\Spectre.Console.Json.csproj" />
|
||||||
|
<ProjectReference Include="..\..\Shared\Shared.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Layout</ExampleTitle>
|
<ExampleTitle>Layout</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to use layouts.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to use layouts.</ExampleDescription>
|
||||||
<ExampleGroup>Widgets</ExampleGroup>
|
<ExampleGroup>Widgets</ExampleGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Links</ExampleTitle>
|
<ExampleTitle>Links</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to render links in a console.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to render links in a console.</ExampleDescription>
|
||||||
<ExampleGroup>Misc</ExampleGroup>
|
<ExampleGroup>Misc</ExampleGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Live</ExampleTitle>
|
<ExampleTitle>Live</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to do live updates.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to do live updates.</ExampleDescription>
|
||||||
<ExampleGroup>Live</ExampleGroup>
|
<ExampleGroup>Live</ExampleGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>LiveTable</ExampleTitle>
|
<ExampleTitle>LiveTable</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to do live updates in a table.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to do live updates in a table.</ExampleDescription>
|
||||||
<ExampleGroup>Live</ExampleGroup>
|
<ExampleGroup>Live</ExampleGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<ExampleTitle>Minimal</ExampleTitle>
|
<ExampleTitle>Minimal</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates a minimal console application.</ExampleDescription>
|
<ExampleDescription>Demonstrates a minimal console application.</ExampleDescription>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Panels</ExampleTitle>
|
<ExampleTitle>Panels</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to render items in panels.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to render items in panels.</ExampleDescription>
|
||||||
<ExampleGroup>Widgets</ExampleGroup>
|
<ExampleGroup>Widgets</ExampleGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Paths</ExampleTitle>
|
<ExampleTitle>Paths</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to render paths.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to render paths.</ExampleDescription>
|
||||||
<ExampleGroup>Widgets</ExampleGroup>
|
<ExampleGroup>Widgets</ExampleGroup>
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Spectre.Console;
|
using Spectre.Console;
|
||||||
|
using Spectre.Console.Rendering;
|
||||||
|
|
||||||
namespace Progress;
|
namespace Progress;
|
||||||
|
|
||||||
@@ -22,35 +24,36 @@ public static class Program
|
|||||||
new RemainingTimeColumn(), // Remaining time
|
new RemainingTimeColumn(), // Remaining time
|
||||||
new SpinnerColumn(), // Spinner
|
new SpinnerColumn(), // Spinner
|
||||||
})
|
})
|
||||||
|
.UseRenderHook((renderable, tasks) => RenderHook(tasks, renderable))
|
||||||
.Start(ctx =>
|
.Start(ctx =>
|
||||||
{
|
{
|
||||||
var random = new Random(DateTime.Now.Millisecond);
|
var random = new Random(DateTime.Now.Millisecond);
|
||||||
|
|
||||||
// Create some tasks
|
// Create some tasks
|
||||||
var tasks = CreateTasks(ctx, random);
|
var tasks = CreateTasks(ctx, random);
|
||||||
var warpTask = ctx.AddTask("Going to warp", autoStart: false).IsIndeterminate();
|
var warpTask = ctx.AddTask("Going to warp", autoStart: false).IsIndeterminate();
|
||||||
|
|
||||||
// Wait for all tasks (except the indeterminate one) to complete
|
// Wait for all tasks (except the indeterminate one) to complete
|
||||||
while (!ctx.IsFinished)
|
while (!ctx.IsFinished)
|
||||||
{
|
{
|
||||||
// Increment progress
|
// Increment progress
|
||||||
foreach (var (task, increment) in tasks)
|
foreach (var (task, increment) in tasks)
|
||||||
{
|
{
|
||||||
task.Increment(random.NextDouble() * increment);
|
task.Increment(random.NextDouble() * increment);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write some random things to the terminal
|
// Write some random things to the terminal
|
||||||
if (random.NextDouble() < 0.1)
|
if (random.NextDouble() < 0.1)
|
||||||
{
|
{
|
||||||
WriteLogMessage();
|
WriteLogMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Simulate some delay
|
// Simulate some delay
|
||||||
Thread.Sleep(100);
|
Thread.Sleep(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now start the "warp" task
|
// Now start the "warp" task
|
||||||
warpTask.StartTask();
|
warpTask.StartTask();
|
||||||
warpTask.IsIndeterminate(false);
|
warpTask.IsIndeterminate(false);
|
||||||
while (!ctx.IsFinished)
|
while (!ctx.IsFinished)
|
||||||
{
|
{
|
||||||
@@ -65,6 +68,35 @@ public static class Program
|
|||||||
AnsiConsole.MarkupLine("[green]Done![/]");
|
AnsiConsole.MarkupLine("[green]Done![/]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static IRenderable RenderHook(IReadOnlyList<ProgressTask> tasks, IRenderable renderable)
|
||||||
|
{
|
||||||
|
var header = new Panel("Going on a :rocket:, we're going to the :crescent_moon:").Expand().RoundedBorder();
|
||||||
|
var footer = new Rows(
|
||||||
|
new Rule(),
|
||||||
|
new Markup(
|
||||||
|
$"[blue]{tasks.Count}[/] total tasks. [green]{tasks.Count(i => i.IsFinished)}[/] complete.")
|
||||||
|
);
|
||||||
|
|
||||||
|
const string ESC = "\u001b";
|
||||||
|
string escapeSequence;
|
||||||
|
if (tasks.All(i => i.IsFinished))
|
||||||
|
{
|
||||||
|
escapeSequence = $"{ESC}]]9;4;0;100{ESC}\\";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var total = tasks.Sum(i => i.MaxValue);
|
||||||
|
var done = tasks.Sum(i => i.Value);
|
||||||
|
var percent = (int)(done / total * 100);
|
||||||
|
escapeSequence = $"{ESC}]]9;4;1;{percent}{ESC}\\";
|
||||||
|
}
|
||||||
|
|
||||||
|
var middleContent = new Grid().AddColumns(new GridColumn(), new GridColumn().Width(20));
|
||||||
|
middleContent.AddRow(renderable, new FigletText(tasks.Count(i => i.IsFinished == false).ToString()));
|
||||||
|
|
||||||
|
return new Rows(header, middleContent, footer, new ControlCode(escapeSequence));
|
||||||
|
}
|
||||||
|
|
||||||
private static List<(ProgressTask Task, int Delay)> CreateTasks(ProgressContext progress, Random random)
|
private static List<(ProgressTask Task, int Delay)> CreateTasks(ProgressContext progress, Random random)
|
||||||
{
|
{
|
||||||
var tasks = new List<(ProgressTask, int)>();
|
var tasks = new List<(ProgressTask, int)>();
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Progress</ExampleTitle>
|
<ExampleTitle>Progress</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to show progress bars.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to show progress bars.</ExampleDescription>
|
||||||
<ExampleGroup>Status</ExampleGroup>
|
<ExampleGroup>Status</ExampleGroup>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -33,11 +33,11 @@ namespace Prompt
|
|||||||
var age = AskAge();
|
var age = AskAge();
|
||||||
|
|
||||||
WriteDivider("Secrets");
|
WriteDivider("Secrets");
|
||||||
var password = AskPassword();
|
var password = AskPassword();
|
||||||
|
|
||||||
WriteDivider("Mask");
|
WriteDivider("Mask");
|
||||||
var mask = AskPasswordWithCustomMask();
|
var mask = AskPasswordWithCustomMask();
|
||||||
|
|
||||||
WriteDivider("Null Mask");
|
WriteDivider("Null Mask");
|
||||||
var nullMask = AskPasswordWithNullMask();
|
var nullMask = AskPasswordWithNullMask();
|
||||||
|
|
||||||
@@ -54,8 +54,8 @@ namespace Prompt
|
|||||||
.AddRow("[grey]Favorite fruit[/]", fruit)
|
.AddRow("[grey]Favorite fruit[/]", fruit)
|
||||||
.AddRow("[grey]Favorite sport[/]", sport)
|
.AddRow("[grey]Favorite sport[/]", sport)
|
||||||
.AddRow("[grey]Age[/]", age.ToString())
|
.AddRow("[grey]Age[/]", age.ToString())
|
||||||
.AddRow("[grey]Password[/]", password)
|
.AddRow("[grey]Password[/]", password)
|
||||||
.AddRow("[grey]Mask[/]", mask)
|
.AddRow("[grey]Mask[/]", mask)
|
||||||
.AddRow("[grey]Null Mask[/]", nullMask)
|
.AddRow("[grey]Null Mask[/]", nullMask)
|
||||||
.AddRow("[grey]Favorite color[/]", string.IsNullOrEmpty(color) ? "Unknown" : color));
|
.AddRow("[grey]Favorite color[/]", string.IsNullOrEmpty(color) ? "Unknown" : color));
|
||||||
}
|
}
|
||||||
@@ -110,6 +110,7 @@ namespace Prompt
|
|||||||
{
|
{
|
||||||
fruit = AnsiConsole.Prompt(
|
fruit = AnsiConsole.Prompt(
|
||||||
new SelectionPrompt<string>()
|
new SelectionPrompt<string>()
|
||||||
|
.EnableSearch()
|
||||||
.Title("Ok, but if you could only choose [green]one[/]?")
|
.Title("Ok, but if you could only choose [green]one[/]?")
|
||||||
.MoreChoicesText("[grey](Move up and down to reveal more fruits)[/]")
|
.MoreChoicesText("[grey](Move up and down to reveal more fruits)[/]")
|
||||||
.AddChoices(favorites));
|
.AddChoices(favorites));
|
||||||
@@ -153,22 +154,22 @@ namespace Prompt
|
|||||||
new TextPrompt<string>("Enter [green]password[/]?")
|
new TextPrompt<string>("Enter [green]password[/]?")
|
||||||
.PromptStyle("red")
|
.PromptStyle("red")
|
||||||
.Secret());
|
.Secret());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string AskPasswordWithCustomMask()
|
public static string AskPasswordWithCustomMask()
|
||||||
{
|
{
|
||||||
return AnsiConsole.Prompt(
|
return AnsiConsole.Prompt(
|
||||||
new TextPrompt<string>("Enter [green]password[/]?")
|
new TextPrompt<string>("Enter [green]password[/]?")
|
||||||
.PromptStyle("red")
|
.PromptStyle("red")
|
||||||
.Secret('-'));
|
.Secret('-'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string AskPasswordWithNullMask()
|
public static string AskPasswordWithNullMask()
|
||||||
{
|
{
|
||||||
return AnsiConsole.Prompt(
|
return AnsiConsole.Prompt(
|
||||||
new TextPrompt<string>("Enter [green]password[/]?")
|
new TextPrompt<string>("Enter [green]password[/]?")
|
||||||
.PromptStyle("red")
|
.PromptStyle("red")
|
||||||
.Secret(null));
|
.Secret(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string AskColor()
|
public static string AskColor()
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<LangVersion>9</LangVersion>
|
<LangVersion>9</LangVersion>
|
||||||
<ExampleTitle>Prompt</ExampleTitle>
|
<ExampleTitle>Prompt</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to get input from a user.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to get input from a user.</ExampleDescription>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Rules</ExampleTitle>
|
<ExampleTitle>Rules</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to render horizontal rules (lines).</ExampleDescription>
|
<ExampleDescription>Demonstrates how to render horizontal rules (lines).</ExampleDescription>
|
||||||
<ExampleGroup>Widgets</ExampleGroup>
|
<ExampleGroup>Widgets</ExampleGroup>
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Showcase</ExampleTitle>
|
<ExampleTitle>Showcase</ExampleTitle>
|
||||||
<ExampleDescription>Demonstation of Spectre.Console.</ExampleDescription>
|
<ExampleDescription>Demonstration of Spectre.Console.</ExampleDescription>
|
||||||
<ExampleGroup>Misc</ExampleGroup>
|
<ExampleGroup>Misc</ExampleGroup>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Status</ExampleTitle>
|
<ExampleTitle>Status</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to show status updates.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to show status updates.</ExampleDescription>
|
||||||
<ExampleGroup>Status</ExampleGroup>
|
<ExampleGroup>Status</ExampleGroup>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Tables</ExampleTitle>
|
<ExampleTitle>Tables</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to render tables in a console.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to render tables in a console.</ExampleDescription>
|
||||||
<ExampleGroup>Widgets</ExampleGroup>
|
<ExampleGroup>Widgets</ExampleGroup>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleTitle>Trees</ExampleTitle>
|
<ExampleTitle>Trees</ExampleTitle>
|
||||||
<ExampleDescription>Demonstrates how to render trees in a console.</ExampleDescription>
|
<ExampleDescription>Demonstrates how to render trees in a console.</ExampleDescription>
|
||||||
<ExampleGroup>Widgets</ExampleGroup>
|
<ExampleGroup>Widgets</ExampleGroup>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ExampleVisible>false</ExampleVisible>
|
<ExampleVisible>false</ExampleVisible>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
12
global.json
12
global.json
@@ -1,5 +1,7 @@
|
|||||||
{
|
{
|
||||||
"sdk": {
|
"$schema": "http://json.schemastore.org/global",
|
||||||
"version": "7.0.100"
|
"sdk": {
|
||||||
}
|
"version": "8.0.200",
|
||||||
}
|
"rollForward": "latestFeature"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Spectre.Console;
|
using Spectre.Console;
|
||||||
|
|
||||||
namespace Generator.Commands
|
namespace Generator.Commands
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace Generator.Commands.Samples
|
|||||||
{
|
{
|
||||||
public abstract void Run(IAnsiConsole console);
|
public abstract void Run(IAnsiConsole console);
|
||||||
public virtual string Name() => PascalToKebab(GetType().Name.Replace("Sample",""));
|
public virtual string Name() => PascalToKebab(GetType().Name.Replace("Sample",""));
|
||||||
public virtual (int Cols, int Rows) ConsoleSize => (120, 24);
|
public virtual (int Cols, int Rows) ConsoleSize => (82, 24);
|
||||||
public virtual IEnumerable<(string Name, Action<Capabilities> CapabilitiesAction)> GetCapabilities()
|
public virtual IEnumerable<(string Name, Action<Capabilities> CapabilitiesAction)> GetCapabilities()
|
||||||
{
|
{
|
||||||
return new (string Name, Action<Capabilities> CapabilitiesAction)[]
|
return new (string Name, Action<Capabilities> CapabilitiesAction)[]
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading;
|
||||||
|
using Spectre.Console;
|
||||||
|
|
||||||
|
// ReSharper disable once CheckNamespace
|
||||||
|
namespace Generator.Commands.Samples;
|
||||||
|
|
||||||
|
// ReSharper disable once UnusedType.Global
|
||||||
|
public class ColumnsSample : BaseSample
|
||||||
|
{
|
||||||
|
public override void Run(IAnsiConsole console)
|
||||||
|
{
|
||||||
|
var cards = Fruit
|
||||||
|
.LoadFriuts()
|
||||||
|
.Select(GetContent)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
// Animate
|
||||||
|
console.Live(new Text(""))
|
||||||
|
.AutoClear(true)
|
||||||
|
.Overflow(VerticalOverflow.Ellipsis)
|
||||||
|
.Cropping(VerticalOverflowCropping.Top)
|
||||||
|
.Start(ctx =>
|
||||||
|
{
|
||||||
|
for (var i = 1; i < cards.Count; i++)
|
||||||
|
{
|
||||||
|
var toShow = cards.Take(i);
|
||||||
|
ctx.UpdateTarget(new Columns(toShow));
|
||||||
|
//ctx.Refresh();
|
||||||
|
Thread.Sleep(200);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Render all cards in columns
|
||||||
|
AnsiConsole.Write(new Spectre.Console.Columns(cards));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string GetContent(Fruit fruit)
|
||||||
|
{
|
||||||
|
return $"[b][yellow]{fruit.Name}[/][/]";
|
||||||
|
}
|
||||||
|
|
||||||
|
private sealed class Fruit
|
||||||
|
{
|
||||||
|
public string Name { get; init; }
|
||||||
|
|
||||||
|
public static List<Fruit> LoadFriuts()
|
||||||
|
{
|
||||||
|
return new []
|
||||||
|
{
|
||||||
|
"Apple",
|
||||||
|
"Apricot",
|
||||||
|
"Avocado",
|
||||||
|
"Banana",
|
||||||
|
"Blackberry",
|
||||||
|
"Blueberry",
|
||||||
|
"Boysenberry",
|
||||||
|
"Breadfruit",
|
||||||
|
"Cacao",
|
||||||
|
"Cherry",
|
||||||
|
"Cloudberry",
|
||||||
|
"Coconut",
|
||||||
|
"Dragonfruit",
|
||||||
|
"Elderberry",
|
||||||
|
"Grape",
|
||||||
|
"Grapefruit",
|
||||||
|
"Jackfruit",
|
||||||
|
"Kiwifruit",
|
||||||
|
"Lemon",
|
||||||
|
"Lime",
|
||||||
|
"Mango",
|
||||||
|
"Melon",
|
||||||
|
"Orange",
|
||||||
|
"Blood orange",
|
||||||
|
"Clementine",
|
||||||
|
"Mandarine",
|
||||||
|
"Tangerine",
|
||||||
|
"Papaya",
|
||||||
|
"Passionfruit",
|
||||||
|
"Plum",
|
||||||
|
"Pineapple",
|
||||||
|
"Pomelo",
|
||||||
|
"Raspberry",
|
||||||
|
"Salmonberry",
|
||||||
|
"Strawberry",
|
||||||
|
"Ximenia",
|
||||||
|
"Yuzu",
|
||||||
|
}
|
||||||
|
.Select(x => new Fruit{Name = x})
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user