From 3871c5ec84697d065dfb31e9727aa20b63e04fb9 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Wed, 1 Dec 2021 19:40:12 +0100 Subject: [PATCH] Add check-earth.ps1 --- Docs/VoiceControl.md | 2 +- Scripts/check-earth.ps1 | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100755 Scripts/check-earth.ps1 diff --git a/Docs/VoiceControl.md b/Docs/VoiceControl.md index 723e9a96..1449b251 100644 --- a/Docs/VoiceControl.md +++ b/Docs/VoiceControl.md @@ -97,7 +97,7 @@ Computer, open `name` settings Computer, check `name` ---------------------- * let the computer check something. -* replace `name` by: "CPU", "date", "DNS", "operating system", "ping", "swap space", "time", "time zone", "up-time", or "weather". +* replace `name` by: "CPU", "date", "DNS", "Earth", "operating system", "ping", "swap space", "time", "time zone", "up-time", or "weather". 🔊 Audio diff --git a/Scripts/check-earth.ps1 b/Scripts/check-earth.ps1 new file mode 100755 index 00000000..b615570b --- /dev/null +++ b/Scripts/check-earth.ps1 @@ -0,0 +1,22 @@ +<# +.SYNOPSIS + Checks the earth (fun) +.DESCRIPTION + This script checks the earth and replies by text-to-speech (TTS). +.EXAMPLE + PS> ./check-earth +.NOTES + Author: Markus Fleschutz · License: CC0 +.LINK + https://github.com/fleschutz/PowerShell +#> + +try { + $Reply = "Earth still spins with 1.040mph" + "✔️ $Reply" + & "$PSScriptRoot/speak-english.ps1" "$Reply" + exit 0 # success +} catch { + "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" + exit 1 +}