Skip to content

Commit

Permalink
Colors. emoji and start of unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunLawrie committed Nov 27, 2023
1 parent 5b2b52e commit 469d4e2
Show file tree
Hide file tree
Showing 16 changed files with 389 additions and 17 deletions.
9 changes: 5 additions & 4 deletions PwshSpectreConsole.Docs/UpdateDocs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Import-Module "$PSScriptRoot\..\PwshSpectreConsole\PwshSpectreConsole.psd1" -For
Remove-Item -Recurse -Path "$PSScriptRoot\src\content\docs\reference\*" -Force
Get-Module PwshSpectreConsole | Save-MarkdownHelp -OutputPath "$PSScriptRoot\src\content\docs\reference\" -IncludeYamlHeader -YamlHeaderInformationType Metadata -ExcludeFile "*.gif", "*.png"

$new = @("New-SpectreChartItem.md")
$new = @("New-SpectreChartItem.md", "Get-SpectreDemoColors", "Get-SpectreDemoEmoji")
$experimental = @("Get-SpectreImageExperimental.md", "Invoke-SpectreScriptBlockQuietly.md")

$newTag = @"
Expand All @@ -30,13 +30,14 @@ sidebar:
# Post-processing for astro stuff
$groups = @(
@{ Name = "Prompts"; Matches = @("read-") }
@{ Name = "Formatting"; Matches = @("format-") }
@{ Name = "Progress"; Matches = @("invoke-", "job", "chartitem") }
@{ Name = "Formatting"; Matches = @("format-", "chartitem") }
@{ Name = "Progress"; Matches = @("invoke-", "job", "spectrescriptblock") }
@{ Name = "Images"; Matches = @("image") }
@{ Name = "Writing"; Matches = @("write-", "escaped") }
@{ Name = "Config"; Matches = @("set-") }
@{ Name = "Demo"; Matches = @("spectredemo") }
)
$remove = @("Start-SpectreDemo.md")

$docs = Get-ChildItem "$PSScriptRoot\src\content\docs\reference\" -Filter "*.md" -Recurse
foreach($doc in $docs) {
if($remove -contains $doc.Name) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: Get-SpectreDemoColors
---







### Synopsis

Get-SpectreDemoColors




---


### Description


---


### Parameters


---


### Inputs
None




---


### Outputs
* [Object](https://learn.microsoft.com/en-us/dotnet/api/System.Object)






---


### Syntax
```powershell
syntaxItem
```

```
```powershell
{@{name=Get-SpectreDemoColors; CommonParameters=False; parameter=System.Object[]}}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: Get-SpectreDemoEmoji
---







### Synopsis

Get-SpectreDemoEmoji




---


### Description


---


### Parameters


---


### Inputs
None




---


### Outputs
* [Object](https://learn.microsoft.com/en-us/dotnet/api/System.Object)






---


### Syntax
```powershell
syntaxItem
```

```
```powershell
{@{name=Get-SpectreDemoEmoji; CommonParameters=False; parameter=System.Object[]}}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: Start-SpectreDemo
---







### Synopsis
Runs a demo of the PwshSpectreConsole module.



---


### Description

This function runs a demo of the PwshSpectreConsole module, showcasing some of its features. It displays various examples of Spectre.Console functionality wrapped in PowerShell functions, such as text entry, select lists, multi-select lists, and panels.



---


### Examples
Runs the PwshSpectreConsole demo.

```powershell
PS C:\> Start-SpectreDemo
```


---


### Syntax
```powershell
Start-SpectreDemo [<CommonParameters>]
```

Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ The type of border to be displayed around the panel. Valid values are "Rounded",



Valid Values:

* Ascii
* Double
* Heavy
* None
* Rounded
* Square






Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,29 @@ The border style of the table. Default is "Double".



Valid Values:

* Ascii
* Ascii2
* AsciiDoubleHead
* Double
* DoubleEdge
* Heavy
* HeavyEdge
* HeavyHead
* Horizontal
* Markdown
* Minimal
* MinimalDoubleHead
* MinimalHeavyHead
* None
* Rounded
* Simple
* SimpleHeavy
* Square






Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,14 @@ The hashtable to format as a tree.



#### **Border**
#### **Guide**

The type of border to use for the tree. Valid values are 'Rounded', 'Heavy', 'Light', 'Double', 'Solid', 'Ascii', and 'None'. Default is 'Rounded'.
Valid Values:

* Ascii
* BoldLine
* DoubleLine
* Line



Expand Down Expand Up @@ -111,6 +116,6 @@ The color to use for the tree. This can be a Spectre Console color name or a hex

### Syntax
```powershell
Format-SpectreTree [-Data] <Hashtable> [[-Border] <String>] [[-Color] <String>] [<CommonParameters>]
Format-SpectreTree [-Data] <Hashtable> [[-Guide] <String>] [[-Color] <String>] [<CommonParameters>]
```

Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,86 @@ The type of spinner to display. Valid values are "dots", "dots2", "dots3", "dots



Valid Values:

* Aesthetic
* Arc
* Arrow
* Arrow2
* Arrow3
* Ascii
* Balloon
* Balloon2
* BetaWave
* Bounce
* BouncingBall
* BouncingBar
* BoxBounce
* BoxBounce2
* Christmas
* Circle
* CircleHalves
* CircleQuarters
* Clock
* Default
* Dots
* Dots10
* Dots11
* Dots12
* Dots2
* Dots3
* Dots4
* Dots5
* Dots6
* Dots7
* Dots8
* Dots8Bit
* Dots9
* Dqpb
* Earth
* Flip
* Grenade
* GrowHorizontal
* GrowVertical
* Hamburger
* Hearts
* Layer
* Line
* Line2
* Material
* Monkey
* Moon
* Noise
* Pipe
* Point
* Pong
* Runner
* Shark
* SimpleDots
* SimpleDotsScrolling
* Smiley
* SquareCorners
* Squish
* Star
* Star2
* Toggle
* Toggle10
* Toggle11
* Toggle12
* Toggle13
* Toggle2
* Toggle3
* Toggle4
* Toggle5
* Toggle6
* Toggle7
* Toggle8
* Toggle9
* Triangle
* Weather






Expand All @@ -84,7 +164,7 @@ The title to display above the spinner.

#### **Color**

The color of the spinner. Valid values are "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white", "gray", "brightRed", "brightGreen", "brightYellow", "brightBlue", "brightMagenta", "brightCyan", "brightWhite".
The color of the spinner. Valid values can be found with Get-SpectreDemoColors.



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ title: Invoke-SpectreScriptBlockQuietly


### Synopsis
A testing function for invoking a script block in a background job inside Invoke-SpectreCommandWithProgress to help with https://github.com/ShaunLawrie/PwshSpectreConsole/issues/7
This is a test function for invoking a script block in a background job inside Invoke-SpectreCommandWithProgress to help with https://github.com/ShaunLawrie/PwshSpectreConsole/issues/7
Some commands cause output that interferes with the progress bar, this function is an attempt to suppress that output when all other attempts have failed.
:::caution
This is experimental.
:::
Expand Down
Loading

0 comments on commit 469d4e2

Please sign in to comment.