mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-09 21:07:40 +02:00
Updated the manuals
This commit is contained in:
@ -6,9 +6,9 @@ This PowerShell script speaks a countdown by text-to-speech (TTS) starting from
|
||||
Parameters
|
||||
----------
|
||||
```powershell
|
||||
/home/markus/Repos/PowerShell/scripts/speak-countdown.ps1 [[-StartNumber] <Int32>] [<CommonParameters>]
|
||||
/home/markus/Repos/PowerShell/scripts/speak-countdown.ps1 [[-startNumber] <Int32>] [<CommonParameters>]
|
||||
|
||||
-StartNumber <Int32>
|
||||
-startNumber <Int32>
|
||||
Specifies the number to start from (10 by default)
|
||||
|
||||
Required? false
|
||||
@ -26,6 +26,7 @@ Example
|
||||
-------
|
||||
```powershell
|
||||
PS> ./speak-countdown.ps1 60
|
||||
(listen and enjoy)
|
||||
|
||||
```
|
||||
|
||||
@ -45,24 +46,25 @@ Script Content
|
||||
Speaks a countdown by text-to-speech
|
||||
.DESCRIPTION
|
||||
This PowerShell script speaks a countdown by text-to-speech (TTS) starting from a given number.
|
||||
.PARAMETER StartNumber
|
||||
.PARAMETER startNumber
|
||||
Specifies the number to start from (10 by default)
|
||||
.EXAMPLE
|
||||
PS> ./speak-countdown.ps1 60
|
||||
(listen and enjoy)
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
param([int]$StartNumber = 10)
|
||||
param([int]$startNumber = 10)
|
||||
|
||||
try {
|
||||
for ([int]$i = $StartNumber; $i -gt 0; $i--) {
|
||||
for ([int]$i = $startNumber; $i -gt 0; $i--) {
|
||||
& "$PSScriptRoot/speak-english.ps1" $i
|
||||
Start-Sleep -milliseconds 200
|
||||
}
|
||||
& "$PSScriptRoot/speak-english.ps1" "zero"
|
||||
& "$PSScriptRoot/speak-english.ps1" "Zero and lift-off!"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
@ -70,4 +72,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 as of 11/08/2024 12:40:22)*
|
||||
*(generated by convert-ps2md.ps1 as of 11/20/2024 11:52:00)*
|
||||
|
Reference in New Issue
Block a user