Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into blz/issues/1390
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/Tests/Spectre.Console.Tests/Expectations/Widgets/Layout/Render_Layout_With_Three_And_One_Columns.Output.verified.txt
  • Loading branch information
BlazeFace committed Oct 26, 2024
2 parents d52d14e + a32dc80 commit 444dbed
Show file tree
Hide file tree
Showing 722 changed files with 1,450 additions and 6,551 deletions.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.

---
Please upvote :+1: this issue if you are interested in it.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ A clear and concise description of any alternative solutions or features you've

**Additional context**
Add any other context or screenshots about the feature request here.

---
Please upvote :+1: this issue if you are interested in it.
3 changes: 3 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ fixes #
## Changes

<!-- describe the changes you made. -->

---
Please upvote :+1: this pull request if you are interested in it.
24 changes: 24 additions & 0 deletions .github/workflows/top-issues-dashboard.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ What is generally considered trivial:
### Code style

Normal .NET coding guidelines apply.
See the [Framework Design Guidelines](https://msdn.microsoft.com/en-us/library/ms229042%28v=vs.110%29.aspx) for more information.
See the [Framework Design Guidelines](https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/) for more information.

### Dependencies

Expand All @@ -59,7 +59,7 @@ Any new code should also have reasonable unit test coverage.
information and a link back to the discussion.
* Once you get a nod from someone in the Spectre.Console Team, you can start on the feature.
* Alternatively, if a feature is on the issues list with the
[Up For Grabs](https://github.com/spectreconsole/spectre.console/labels/up-for-grabs) label,
[good first issue](https://github.com/spectreconsole/spectre.console/labels/good%20first%20issue) label,
it is open for a community member (contributor) to patch. You should comment that you are signing up for it on
the issue so someone else doesn't also sign up for the work.

Expand Down Expand Up @@ -158,4 +158,4 @@ Harder for us roughly translates to a longer SLA for your pull request.
## Acknowledgement

This contribution guide was taken from the [Chocolatey project](https://chocolatey.org/)
with permission and was edited to follow Spectre.Console's conventions and processes.
with permission and was edited to follow Spectre.Console's conventions and processes.
23 changes: 3 additions & 20 deletions README.fa.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,13 @@ https://spectreconsole.net/

<h2 id="examples">مثال‌ها</h2>

برای بررسی `Spectre.Console` در عمل، ابزار سراسری
[dotnet-example](https://github.com/patriksvensson/dotnet-example)
را نصب کنید.

<pre dir="ltr">
> dotnet tool restore
</pre>

حالا شما می‌توانید مثال‌های موجود در این مخزن را لیست کنید:

<pre dir="ltr">
> dotnet example
</pre>

و برای اجرای مثال:

<pre dir="ltr">
> dotnet example tables
</pre>
To see `Spectre.Console` in action, please see the
[examples repository](https://github.com/spectreconsole/examples).

<h2 id="license">مجوز</h2>

<div dir="ltr">
Copyright © Patrik Svensson, Phil Scott
Copyright © Patrik Svensson, Phil Scott, Nils Andresen, Cédric Luthi, Frank Ray
</div>

همانطور که Spectre.Console تحت مجوز MIT ارائه شده است؛ برای کسب اطلاعات بیشتر به مجوز مراجعه کنید.
Expand Down
46 changes: 16 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
_[![Spectre.Console NuGet Version](https://img.shields.io/nuget/v/spectre.console.svg?style=flat&label=NuGet%3A%20Spectre.Console)](https://www.nuget.org/packages/spectre.console)_ _[![Spectre.Console CLI NuGet Version](https://img.shields.io/nuget/v/spectre.console.cli.svg?style=flat&label=NuGet%3A%20Spectre.Console.Cli)](https://www.nuget.org/packages/spectre.console.cli)_ [![Netlify Status](https://api.netlify.com/api/v1/badges/1eaf215a-eb9c-45e4-8c64-c90b62963149/deploy-status)](https://app.netlify.com/sites/spectreconsole/deploys)

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)
for Python. For detailed usage instructions, [please refer to the documentation at https://spectreconsole.net/.](https://spectreconsole.net/)
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

## Table of Contents

Expand All @@ -19,18 +18,22 @@ for Python. For detailed usage instructions, [please refer to the documentation

## 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
styling such as bold, dim, italic, underline, strikethrough,
and blinking text.
* Supports 3/4/8/24-bit colors in the 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.

![Example](docs/input/assets/images/example.png)

## 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

The fastest way of getting started using `Spectre.Console` is to install the NuGet package.
Expand All @@ -42,34 +45,17 @@ dotnet add package Spectre.Console
## Documentation

The documentation for `Spectre.Console` can be found at
https://spectreconsole.net/
https://spectreconsole.net

## Examples

To see `Spectre.Console` in action, install the
[dotnet-example](https://github.com/patriksvensson/dotnet-example)
global tool.

```
> dotnet tool restore
```

Now you can list available examples in this repository:

```
> dotnet example
```

And to run an example:

```
> dotnet example tables
```
To see `Spectre.Console` in action, please see the
[examples repository](https://github.com/spectreconsole/examples).

## Sponsors

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)
* [Martin Björkström](https://github.com/bjorkstromm)
Expand Down Expand Up @@ -97,8 +83,8 @@ This project is supported by the [.NET Foundation](https://dotnetfoundation.org)

## License

Copyright © Patrik Svensson, Phil Scott, Nils Andresen
Copyright © Patrik Svensson, Phil Scott, Nils Andresen, Cédric Luthi, Frank Ray

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
22 changes: 3 additions & 19 deletions README.pt-BR.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,8 @@ https://spectreconsole.net/

## Exemplos

Para ver o `Spectre.Console` em ação, instale a ferramenta global
[dotnet-example](https://github.com/patriksvensson/dotnet-example).

```
> dotnet tool restore
```

Agora você pode listar os exemplos disponíveis neste repositório:

```
> dotnet example
```

E para executar um exemplo:

```
> dotnet example tables
```
To see `Spectre.Console` in action, please see the
[examples repository](https://github.com/spectreconsole/examples).

## Patrocinadores

Expand All @@ -83,7 +67,7 @@ Eu estou muito agradecido.

## Licença

Copyright © Patrik Svensson, Phil Scott, Nils Andresen
Copyright © Patrik Svensson, Phil Scott, Nils Andresen, Cédric Luthi, Frank Ray

Spectre.Console é fornecido no estado em que se encontra sob a licença do MIT. Para obter mais informações, consulte o arquivo [LICENSE](LICENSE.md).

Expand Down
21 changes: 3 additions & 18 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,8 @@ https://spectreconsole.net/

## 例子

如果想直接运行`Spectre.Console`的例子,则需要安装[dotnet-example](https://github.com/patriksvensson/dotnet-example)工具。

```
> dotnet tool restore
```

然后你可以列出仓库里的所有例子:

```
> dotnet example
```

跑一个看看效果:

```
> dotnet example tables
```
To see `Spectre.Console` in action, please see the
[examples repository](https://github.com/spectreconsole/examples).

## Sponsors

Expand All @@ -77,7 +62,7 @@ https://spectreconsole.net/

## 开源许可

版权所有 © Patrik Svensson, Phil Scott, Nils Andresen
版权所有 © Patrik Svensson, Phil Scott, Nils Andresen, Cédric Luthi, Frank Ray

Spectre.Console 基于 MIT 协议提供。查看 LICENSE 文件了解更多信息。

Expand Down
53 changes: 2 additions & 51 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -35,57 +35,19 @@ Task("Build")
});
});

Task("Build-Analyzer")
.IsDependentOn("Build")
.Does(context =>
{
DotNetBuild("./src/Spectre.Console.Analyzer.sln", new DotNetBuildSettings {
Configuration = configuration,
Verbosity = DotNetVerbosity.Minimal,
NoLogo = true,
NoIncremental = context.HasArgument("rebuild"),
MSBuildSettings = new DotNetMSBuildSettings()
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
});
});

Task("Build-Examples")
.IsDependentOn("Build")
.Does(context =>
{
DotNetBuild("./examples/Examples.sln", new DotNetBuildSettings {
Configuration = configuration,
Verbosity = DotNetVerbosity.Minimal,
NoLogo = true,
NoIncremental = context.HasArgument("rebuild"),
MSBuildSettings = new DotNetMSBuildSettings()
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
});
});

Task("Test")
.IsDependentOn("Build")
.IsDependentOn("Build-Analyzer")
.IsDependentOn("Build-Examples")
.Does(context =>
{
DotNetTest("./test/Spectre.Console.Tests/Spectre.Console.Tests.csproj", new DotNetTestSettings {
Configuration = configuration,
Verbosity = DotNetVerbosity.Minimal,
NoLogo = true,
NoRestore = true,
NoBuild = true,
});

DotNetTest("./test/Spectre.Console.Cli.Tests/Spectre.Console.Cli.Tests.csproj", new DotNetTestSettings {
DotNetTest("./src/Tests/Spectre.Console.Tests/Spectre.Console.Tests.csproj", new DotNetTestSettings {
Configuration = configuration,
Verbosity = DotNetVerbosity.Minimal,
NoLogo = true,
NoRestore = true,
NoBuild = true,
});

DotNetTest("./test/Spectre.Console.Analyzer.Tests/Spectre.Console.Analyzer.Tests.csproj", new DotNetTestSettings {
DotNetTest("./src/Tests/Spectre.Console.Cli.Tests/Spectre.Console.Cli.Tests.csproj", new DotNetTestSettings {
Configuration = configuration,
Verbosity = DotNetVerbosity.Minimal,
NoLogo = true,
Expand All @@ -108,17 +70,6 @@ Task("Package")
MSBuildSettings = new DotNetMSBuildSettings()
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
});

context.DotNetPack($"./src/Spectre.Console.Analyzer.sln", new DotNetPackSettings {
Configuration = configuration,
Verbosity = DotNetVerbosity.Minimal,
NoLogo = true,
NoRestore = true,
NoBuild = true,
OutputDirectory = "./.artifacts",
MSBuildSettings = new DotNetMSBuildSettings()
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
});
});

Task("Publish-NuGet")
Expand Down
4 changes: 2 additions & 2 deletions docs/input/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Spectre.Console will tell your terminal to use the color that is configured in t
If you are using an 8 or 24-bit color for the foreground text, it is recommended that you also set an appropriate
background color to match.

**Do** escape data when outputting any user input or any external data via Markup using the [`EscapeMarkup`](xref:M:Spectre.Console.Markup.Escape(System.String)) method on the data. Any user input containing `[` or `]` will likely cause a runtime error while rendering otherwise.
**Do** escape data when outputting any user input or any external data via Markup using the [`Markup.Escape`](xref:M:Spectre.Console.Markup.Escape(System.String)) method on the data. Any user input containing `[` or `]` will likely cause a runtime error while rendering otherwise.

**Consider** replacing `Markup` and `MarkupLine` with [`MarkupInterpolated`](xref:M:Spectre.Console.AnsiConsole.MarkupInterpolated(System.FormattableString)) and [`MarkupLineInterpolated`](xref:M:Spectre.Console.AnsiConsole.MarkupLineInterpolated(System.FormattableString)). Both these methods will automatically escape all data in the interpolated string holes. When working with widgets such as the Table and Tree, consider using [`Markup.FromInterpolated`](xref:M:Spectre.Console.Markup.FromInterpolated(System.FormattableString,Spectre.Console.Style)) to generate an `IRenderable` from an interpolated string.

Expand Down Expand Up @@ -119,4 +119,4 @@ For cmd.exe, the following steps are required to enable Unicode and Emoji suppor
5. Reboot.

You will also need to ensure that your Console application is configured to use a font that supports Unicode and Emoji,
such as Cascadia Code.
such as Cascadia Code.
Loading

0 comments on commit 444dbed

Please sign in to comment.