Add good-evening.ps1 and good-night.ps1

This commit is contained in:
Markus Fleschutz 2021-11-18 07:38:28 +01:00
parent d013e3e60b
commit 81f2da600a
2 changed files with 40 additions and 0 deletions

20
Scripts/good-evening.ps1 Normal file
View File

@ -0,0 +1,20 @@
<#
.SYNOPSIS
Say an answer to 'good evening'
.DESCRIPTION
This script answers "good evening" by text-to-speech (TTS).
.EXAMPLE
PS> ./good-evening
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
try {
& "$PSScriptRoot/speak-english.ps1" "And a special good evening to you too"
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
exit 1
}

20
Scripts/good-night.ps1 Normal file
View File

@ -0,0 +1,20 @@
<#
.SYNOPSIS
Say an answer to 'good night'
.DESCRIPTION
This script answers "good night" by text-to-speech (TTS).
.EXAMPLE
PS> ./good-night
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
try {
& "$PSScriptRoot/speak-english.ps1" "Good night to you, my friend."
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
exit 1
}