mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-25 03:18:16 +02:00
Add good-evening.ps1 and good-night.ps1
This commit is contained in:
parent
d013e3e60b
commit
81f2da600a
20
Scripts/good-evening.ps1
Normal file
20
Scripts/good-evening.ps1
Normal 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
20
Scripts/good-night.ps1
Normal 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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user