mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-26 09:53:57 +01:00
Add good-bye.ps1
This commit is contained in:
parent
d7cb9342f0
commit
395bc98718
@ -110,3 +110,4 @@ Nice Conversation
|
||||
* *Computer, good night.*
|
||||
* *Computer, how are you?*
|
||||
* *Computer, thank you.*
|
||||
* *Computer, good bye.*
|
||||
|
18
Scripts/good-bye.ps1
Normal file
18
Scripts/good-bye.ps1
Normal file
@ -0,0 +1,18 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Say an answer to 'good bye'
|
||||
.DESCRIPTION
|
||||
This script answers to "good bye" by text-to-speech (TTS).
|
||||
.EXAMPLE
|
||||
PS> ./good-bye
|
||||
.NOTES
|
||||
Author: Markus Fleschutz · License: CC0
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
#>
|
||||
|
||||
$Answer = "Good bye.", "See you." | Get-Random
|
||||
|
||||
write-output "$Answer"
|
||||
& "$PSScriptRoot/speak-english.ps1" "$Answer"
|
||||
exit 0 # success
|
@ -11,10 +11,8 @@
|
||||
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
|
||||
}
|
||||
$Answer = "And a special good evening to you too."
|
||||
|
||||
write-output "$Answer"
|
||||
& "$PSScriptRoot/speak-english.ps1" "$Answer"
|
||||
exit 0 # success
|
||||
|
@ -11,10 +11,8 @@
|
||||
https://github.com/fleschutz/PowerShell
|
||||
#>
|
||||
|
||||
try {
|
||||
& "$PSScriptRoot/speak-english.ps1" "Well, good morning to you too"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||
exit 1
|
||||
}
|
||||
$Answer = "Well, good morning to you too."
|
||||
|
||||
write-output "$Answer"
|
||||
& "$PSScriptRoot/speak-english.ps1" "$Answer"
|
||||
exit 0 # success
|
||||
|
@ -1,6 +1,6 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Answers to 'good night'
|
||||
Say an answer to 'good night'
|
||||
.DESCRIPTION
|
||||
This script answers to "good night" by text-to-speech (TTS).
|
||||
.EXAMPLE
|
||||
@ -11,11 +11,8 @@
|
||||
https://github.com/fleschutz/PowerShell
|
||||
#>
|
||||
|
||||
try {
|
||||
$Answer = "Good night to you, too.", "Good night to you, my friend.", "Have a good night. Sleep well.", "Good night and sweet dreams." | Get-Random
|
||||
& "$PSScriptRoot/speak-english.ps1" "$Answer"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||
exit 1
|
||||
}
|
||||
$Answer = "Good night to you, too.", "Good night to you, my friend.", "Have a good night. Sleep well.", "Good night and sweet dreams." | Get-Random
|
||||
|
||||
write-output "$Answer"
|
||||
& "$PSScriptRoot/speak-english.ps1" "$Answer"
|
||||
exit 0 # success
|
||||
|
@ -11,10 +11,8 @@
|
||||
https://github.com/fleschutz/PowerShell
|
||||
#>
|
||||
|
||||
try {
|
||||
& "$PSScriptRoot/speak-english.ps1" "It's a pleasure."
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||
exit 1
|
||||
}
|
||||
$Answer = "It's a pleasure.", "Never mind." | Get-Random
|
||||
|
||||
write-output "$Answer"
|
||||
& "$PSScriptRoot/speak-english.ps1" "$Answer"
|
||||
exit 0 # success
|
||||
|
Loading…
Reference in New Issue
Block a user